Another smattering of static and const
authorAndrew Bartlett <abartlet@samba.org>
Sun, 21 Jul 2002 03:26:10 +0000 (03:26 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 21 Jul 2002 03:26:10 +0000 (03:26 +0000)
(This used to be commit 897cc4a610932e596f8a9807213166e380ef0203)

source3/lib/util.c
source3/nsswitch/pam_winbind.c
source3/nsswitch/winbindd.c
source3/torture/locktest.c
source3/utils/pdbedit.c
source3/utils/smbcacls.c
source3/utils/smbtree.c

index bcef3013f9d82b9b5056dc5708df1b4c5d6b6545..ae94b710b2cbabc2603294bab617c9678a5f4d40 100644 (file)
@@ -100,7 +100,7 @@ char *tmpdir(void)
  Determine whether we are in the specified group.
 ****************************************************************************/
 
-BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups)
+BOOL in_group(gid_t group, gid_t current_gid, int ngroups, const gid_t *groups)
 {
        int i;
 
index 4739cfbf7adc9be4f7d694ac1d19451d3aed6001..a8754d1710db7befcc8c2ab3ba09858091d767a9 100644 (file)
@@ -79,7 +79,7 @@ static int converse(pam_handle_t *pamh, int nargs,
 }
 
 
-int _make_remark(pam_handle_t * pamh, int type, const char *text)
+static int _make_remark(pam_handle_t * pamh, int type, const char *text)
 {
        int retval = PAM_SUCCESS;
 
@@ -241,12 +241,12 @@ static char *_pam_delete(register char *xx)
  * obtain a password from the user
  */
 
-int _winbind_read_password(pam_handle_t * pamh
-                       ,unsigned int ctrl
-                       ,const char *comment
-                       ,const char *prompt1
-                       ,const char *prompt2
-                       ,const char **pass)
+static int _winbind_read_password(pam_handle_t * pamh
+                                 ,unsigned int ctrl
+                                 ,const char *comment
+                                 ,const char *prompt1
+                                 ,const char *prompt2
+                                 ,const char **pass)
 {
        int authtok_flag;
        int retval;
index 358d9add3a388c10f3de544bcbfe8f3a8e946c2d..fbeb6b6347fc265eaa92a265a0677ef97e8ef886 100644 (file)
@@ -25,7 +25,7 @@
 
 /* List of all connected clients */
 
-struct winbindd_cli_state *client_list;
+static struct winbindd_cli_state *client_list;
 static int num_clients;
 BOOL opt_nocache = False;
 BOOL opt_dual_daemon = False;
index c34b4c1ad2d8864b1a1750b7377f098d8946dfc6..a62f7af1ad693b18bb71b3ccfe8ceed2dac42ce3 100644 (file)
@@ -136,7 +136,7 @@ static void show_locks(void)
 /***************************************************** 
 return a connection to a server
 *******************************************************/
-struct cli_state *connect_one(char *share, int snum)
+static struct cli_state *connect_one(char *share, int snum)
 {
        struct cli_state *c;
        struct nmb_name called, calling;
index b30ab6f38e8cc05d0ae762159193d195e60c81df..5fa7e3be95996239e314d444a7b091502fc5396f 100644 (file)
@@ -30,7 +30,7 @@ extern BOOL AllowDebugChange;
  Add all currently available users to another db
  ********************************************************/
 
-int export_database (struct pdb_context *in, char *db){
+static int export_database (struct pdb_context *in, char *db){
        struct pdb_context *context;
        SAM_ACCOUNT *user = NULL;
 
index b6a13180a377715e836405db1aa79ee6eb53d257..4f9df90fa28155af75eab0d13d005ee4a210b4fa 100644 (file)
@@ -29,7 +29,7 @@ static pstring owner_username;
 static fstring server;
 static int got_pass;
 static int test_args;
-TALLOC_CTX *ctx;
+static TALLOC_CTX *ctx;
 
 #define CREATE_ACCESS_READ READ_CONTROL_ACCESS
 #define CREATE_ACCESS_WRITE (WRITE_DAC_ACCESS | WRITE_OWNER_ACCESS)
index bcb460ee0bf1bfad17cdb192118f634e3425501c..b733f8112f382de50255155d90b846bba7c1b3ba 100644 (file)
@@ -32,7 +32,7 @@ struct user_auth_info {
 /* How low can we go? */
 
 enum tree_level {LEV_WORKGROUP, LEV_SERVER, LEV_SHARE};
-enum tree_level level = LEV_SHARE;
+static enum tree_level level = LEV_SHARE;
 
 static void usage(void)
 {