diff options
author | Chris Hall <chris.hall@highwayman.com> | 2010-12-21 11:12:30 +0000 |
---|---|---|
committer | Chris Hall <chris.hall@highwayman.com> | 2010-12-21 11:12:30 +0000 |
commit | 121f2f888e02a28e7896f84dde019cb320f0b11d (patch) | |
tree | 99c3913759b80894b1cb83a508036223b9c98f5a /vtysh/vtysh_user.c | |
parent | d475a0f198f880595eb27e44008e5de3aad25d73 (diff) | |
download | quagga-121f2f888e02a28e7896f84dde019cb320f0b11d.tar.bz2 quagga-121f2f888e02a28e7896f84dde019cb320f0b11d.tar.xz |
Creation of pipework branch
Diffstat (limited to 'vtysh/vtysh_user.c')
-rw-r--r-- | vtysh/vtysh_user.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/vtysh/vtysh_user.c b/vtysh/vtysh_user.c index 58676c10..5dd50bb7 100644 --- a/vtysh/vtysh_user.c +++ b/vtysh/vtysh_user.c @@ -21,6 +21,7 @@ #include <zebra.h> #include <lib/version.h> +#include <vtysh_user.h> #include <pwd.h> @@ -98,19 +99,21 @@ struct vtysh_user struct list *userlist; -struct vtysh_user * +static struct vtysh_user * user_new () { return XCALLOC (0, sizeof (struct vtysh_user)); } -void +static void user_free (struct vtysh_user *user) __attribute__((unused)) ; + +static void user_free (struct vtysh_user *user) { XFREE (0, user); } -struct vtysh_user * +static struct vtysh_user * user_lookup (const char *name) { struct listnode *node, *nnode; @@ -124,8 +127,10 @@ user_lookup (const char *name) return NULL; } -void -user_config_write () +static void user_config_write (void) __attribute__((unused)) ; + +static void +user_config_write (void) { struct listnode *node, *nnode; struct vtysh_user *user; @@ -137,7 +142,7 @@ user_config_write () } } -struct vtysh_user * +static struct vtysh_user * user_get (const char *name) { struct vtysh_user *user; @@ -165,8 +170,8 @@ DEFUN (username_nopassword, return CMD_SUCCESS; } -int -vtysh_auth () +extern int +vtysh_auth(void) { struct vtysh_user *user; struct passwd *passwd; @@ -186,8 +191,8 @@ vtysh_auth () return 0; } -void -vtysh_user_init () +extern void +vtysh_user_init(void) { userlist = list_new (); install_element (CONFIG_NODE, &username_nopassword_cmd); |