]> granicus.if.org Git - sudo/commitdiff
Make the remaining functions in ldap.c static
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 14 Jun 2010 14:37:25 +0000 (10:37 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 14 Jun 2010 14:37:25 +0000 (10:37 -0400)
--HG--
branch : 1.7

ldap.c
sudo.h

diff --git a/ldap.c b/ldap.c
index a6dba42c58dc74fce1a088007424259187872451..56967e1a0d3ac1880d1ae4c68bb2a30cc6e2f82c 100644 (file)
--- a/ldap.c
+++ b/ldap.c
@@ -229,6 +229,21 @@ static struct ldap_config_table ldap_conf_table[] = {
     { NULL }
 };
 
+/* sudo_nss implementation */
+static int sudo_ldap_open __P((struct sudo_nss *nss));
+static int sudo_ldap_close __P((struct sudo_nss *nss));
+static int sudo_ldap_parse __P((struct sudo_nss *nss));
+static int sudo_ldap_setdefs __P((struct sudo_nss *nss));
+static int sudo_ldap_lookup __P((struct sudo_nss *nss, int ret, int pwflag));
+static int sudo_ldap_display_cmnd __P((struct sudo_nss *nss,
+    struct passwd *pw));
+static int sudo_ldap_display_defaults __P((struct sudo_nss *nss,
+    struct passwd *pw, struct lbuf *lbuf));
+static int sudo_ldap_display_bound_defaults __P((struct sudo_nss *nss,
+    struct passwd *pw, struct lbuf *lbuf));
+static int sudo_ldap_display_privs __P((struct sudo_nss *nss,
+    struct passwd *pw, struct lbuf *lbuf));
+
 struct sudo_nss sudo_nss_ldap = {
     &sudo_nss_ldap,
     NULL,
@@ -1132,7 +1147,7 @@ sudo_ldap_get_first_rdn(ld, entry)
 /*
  * Fetch and display the global Options.
  */
-int
+static int
 sudo_ldap_display_defaults(nss, pw, lbuf)
     struct sudo_nss *nss;
     struct passwd *pw;
@@ -1169,7 +1184,7 @@ sudo_ldap_display_defaults(nss, pw, lbuf)
 /*
  * STUB
  */
-int
+static int
 sudo_ldap_display_bound_defaults(nss, pw, lbuf)
     struct sudo_nss *nss;
     struct passwd *pw;
@@ -1339,7 +1354,7 @@ sudo_ldap_display_entry_long(ld, entry, lbuf)
 /*
  * Like sudo_ldap_lookup(), except we just print entries.
  */
-int
+static int
 sudo_ldap_display_privs(nss, pw, lbuf)
     struct sudo_nss *nss;
     struct passwd *pw;
@@ -1394,7 +1409,7 @@ sudo_ldap_display_privs(nss, pw, lbuf)
     return(count);
 }
 
-int
+static int
 sudo_ldap_display_cmnd(nss, pw)
     struct sudo_nss *nss;
     struct passwd *pw;
@@ -1653,7 +1668,7 @@ sudo_ldap_bind_s(ld)
  * Open a connection to the LDAP server.
  * Returns 0 on success and non-zero on failure.
  */
-int
+static int
 sudo_ldap_open(nss)
     struct sudo_nss *nss;
 {
@@ -1721,7 +1736,7 @@ sudo_ldap_open(nss)
     return(0);
 }
 
-int
+static int
 sudo_ldap_setdefs(nss)
     struct sudo_nss *nss;
 {
@@ -1749,7 +1764,7 @@ sudo_ldap_setdefs(nss)
 /*
  * like sudoers_lookup() - only LDAP style
  */
-int
+static int
 sudo_ldap_lookup(nss, ret, pwflag)
     struct sudo_nss *nss;
     int ret;
@@ -1920,7 +1935,7 @@ done:
 /*
  * shut down LDAP connection
  */
-int
+static int
 sudo_ldap_close(nss)
     struct sudo_nss *nss;
 {
@@ -1934,7 +1949,7 @@ sudo_ldap_close(nss)
 /*
  * STUB
  */
-int
+static int
 sudo_ldap_parse(nss)
     struct sudo_nss *nss;
 {
diff --git a/sudo.h b/sudo.h
index 0155372356c8060eb59e21c79dd132c73d39f576..52b1e21825289f82e9960a6eed1f6be7dbd0e0df 100644 (file)
--- a/sudo.h
+++ b/sudo.h
@@ -274,17 +274,6 @@ int log_ttyout __P((const char *buf, unsigned int len));
 void io_log_close __P((void));
 void io_nextid __P((void));
 
-/* ldap.c */
-int sudo_ldap_open     __P((struct sudo_nss *));
-int sudo_ldap_close    __P((struct sudo_nss *));
-int sudo_ldap_setdefs  __P((struct sudo_nss *));
-int sudo_ldap_lookup   __P((struct sudo_nss *, int, int));
-int sudo_ldap_parse    __P((struct sudo_nss *));
-int sudo_ldap_display_cmnd __P((struct sudo_nss *, struct passwd *));
-int sudo_ldap_display_defaults __P((struct sudo_nss *, struct passwd *, struct lbuf *));
-int sudo_ldap_display_bound_defaults __P((struct sudo_nss *, struct passwd *, struct lbuf *));
-int sudo_ldap_display_privs __P((struct sudo_nss *, struct passwd *, struct lbuf *));
-
 /* pam.c */
 int pam_begin_session  __P((struct passwd *));
 int pam_end_session    __P((void));