]> git.proxmox.com Git - mirror_frr.git/blobdiff - vtysh/vtysh_user.c
Merge branch 'cmaster-next' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into...
[mirror_frr.git] / vtysh / vtysh_user.c
index 3e7726423503fcdc3e64de79b28501737fc14529..0d72c378a31862fbb3732b36892091d733c6db10 100644 (file)
  * The DEFUNSH and DEFUN macro's are messing with the
  * compiler I believe.  This is just to make it happy.
  */
-int vtysh_pam(const char *);
-struct vtysh_user *user_new(void);
-void user_free(struct vtysh_user *);
-struct vtysh_user *user_lookup(const char *);
-struct vtysh_user *user_get(const char *);
+#ifdef USE_PAM
+static int vtysh_pam(const char *);
+#endif
 int vtysh_auth(void);
 void vtysh_user_init(void);
 
@@ -62,7 +60,7 @@ static struct pam_conv conv =
   NULL
 };
 
-int
+static int
 vtysh_pam (const char *user)
 {
   int ret;
@@ -115,19 +113,13 @@ struct vtysh_user
 
 struct list *userlist;
 
-struct vtysh_user *
+static struct vtysh_user *
 user_new (void)
 {
   return XCALLOC (0, sizeof (struct vtysh_user));
 }
 
-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;
@@ -158,7 +150,7 @@ user_config_write ()
     }
 }
 
-struct vtysh_user *
+static struct vtysh_user *
 user_get (const char *name)
 {
   struct vtysh_user *user;
@@ -198,7 +190,7 @@ DEFUN (username_nopassword,
 }
 
 int
-vtysh_auth ()
+vtysh_auth (void)
 {
   struct vtysh_user *user;
   struct passwd *passwd;