diff options
author | Andrew Bartlett <abartlet@samba.org> | 2001-10-31 06:22:19 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2001-10-31 06:22:19 +0000 |
commit | 6ab678d42b46eccee080de415985a8a1e3c29dc3 (patch) | |
tree | 166a84c3988da85c3554fad30e43e8ea72aa17c7 | |
parent | 6f0b8a38ec036a0027e9f938834e241b41db40c5 (diff) | |
download | samba-6ab678d42b46eccee080de415985a8a1e3c29dc3.tar.gz samba-6ab678d42b46eccee080de415985a8a1e3c29dc3.tar.bz2 samba-6ab678d42b46eccee080de415985a8a1e3c29dc3.zip |
Small 'const' updates ahead of some AuthRewrite merging.
(This used to be commit 3b5e72bda3263c6bdf81dfface4fae4f06b71032)
-rw-r--r-- | source3/auth/pampass.c | 10 | ||||
-rw-r--r-- | source3/lib/util_str.c | 2 | ||||
-rw-r--r-- | source3/param/loadparm.c | 14 | ||||
-rw-r--r-- | source3/passdb/pampass.c | 10 |
4 files changed, 18 insertions, 18 deletions
diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c index 6980b14f46..018eae3a07 100644 --- a/source3/auth/pampass.c +++ b/source3/auth/pampass.c @@ -547,7 +547,7 @@ static NTSTATUS smb_pam_auth(pam_handle_t *pamh, char *user) /* * PAM Account Handler */ -static NTSTATUS smb_pam_account(pam_handle_t *pamh, char * user) +static NTSTATUS smb_pam_account(pam_handle_t *pamh, const char * user) { int pam_error; NTSTATUS nt_status = NT_STATUS_ACCOUNT_DISABLED; @@ -777,7 +777,7 @@ BOOL smb_pam_close_session(char *user, char *tty, char *rhost) * PAM Externally accessible Account handler */ -NTSTATUS smb_pam_accountcheck(char * user) +NTSTATUS smb_pam_accountcheck(const char * user) { NTSTATUS nt_status = NT_STATUS_ACCOUNT_DISABLED; pam_handle_t *pamh = NULL; @@ -873,19 +873,19 @@ BOOL smb_pam_passchange(const char * user, const char * oldpassword, const char #else /* If PAM not used, no PAM restrictions on accounts. */ - NTSTATUS smb_pam_accountcheck(char * user) +NTSTATUS smb_pam_accountcheck(const char * user) { return NT_STATUS_OK; } /* If PAM not used, also no PAM restrictions on sessions. */ - BOOL smb_pam_claim_session(char *user, char *tty, char *rhost) +BOOL smb_pam_claim_session(char *user, char *tty, char *rhost) { return True; } /* If PAM not used, also no PAM restrictions on sessions. */ - BOOL smb_pam_close_session(char *in_user, char *tty, char *rhost) +BOOL smb_pam_close_session(char *in_user, char *tty, char *rhost) { return True; } diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 3a77098e09..e97885ae05 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -184,7 +184,7 @@ BOOL strcsequal(const char *s1,const char *s2) /*************************************************************************** Do a case-insensitive, whitespace-ignoring string compare. ***************************************************************************/ -int strwicmp(char *psz1, char *psz2) +int strwicmp(const char *psz1, const char *psz2) { /* if BOTH strings are NULL, return TRUE, if ONE is NULL return */ /* appropriate value. */ diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index f6abda4ac9..f9355ed14f 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1719,10 +1719,10 @@ FN_GLOBAL_BOOL(lp_hide_local_users, &Globals.bHideLocalUsers) static int map_parameter(char *pszParmName); static BOOL set_boolean(BOOL *pb, char *pszParmValue); -static int getservicebyname(char *pszServiceName, - service * pserviceDest); +static int getservicebyname(const char *pszServiceName, + service * pserviceDest); static void copy_service(service * pserviceDest, - service * pserviceSource, BOOL *pcopymapDest); + service * pserviceSource, BOOL *pcopymapDest); static BOOL service_ok(int iService); static BOOL do_parameter(char *pszParmName, char *pszParmValue); static BOOL do_section(char *pszSectionName); @@ -1779,7 +1779,7 @@ static void free_service(service * pservice) add a new service to the services array initialising it with the given service. ***************************************************************************/ -static int add_a_service(service * pservice, char *name) +static int add_a_service(const service * pservice, const char *name) { int i; service tservice; @@ -1843,7 +1843,7 @@ static int add_a_service(service * pservice, char *name) add a new home service, with the specified home directory, defaults coming from service ifrom. ***************************************************************************/ -BOOL lp_add_home(char *pszHomename, int iDefaultService, char *pszHomedir) +BOOL lp_add_home(const char *pszHomename, int iDefaultService, const char *pszHomedir) { int i = add_a_service(ServicePtrs[iDefaultService], pszHomename); @@ -1996,7 +1996,7 @@ static BOOL set_boolean(BOOL *pb, char *pszParmValue) /*************************************************************************** Find a service by name. Otherwise works like get_service. ***************************************************************************/ -static int getservicebyname(char *pszServiceName, service * pserviceDest) +static int getservicebyname(const char *pszServiceName, service * pserviceDest) { int iService; @@ -3353,7 +3353,7 @@ exist. Note that this is a DIFFERENT ANIMAL from the internal function getservicebyname()! This works ONLY if all services have been loaded, and does not copy the found service. ***************************************************************************/ -int lp_servicenumber(char *pszServiceName) +int lp_servicenumber(const char *pszServiceName) { int iService; diff --git a/source3/passdb/pampass.c b/source3/passdb/pampass.c index 6980b14f46..018eae3a07 100644 --- a/source3/passdb/pampass.c +++ b/source3/passdb/pampass.c @@ -547,7 +547,7 @@ static NTSTATUS smb_pam_auth(pam_handle_t *pamh, char *user) /* * PAM Account Handler */ -static NTSTATUS smb_pam_account(pam_handle_t *pamh, char * user) +static NTSTATUS smb_pam_account(pam_handle_t *pamh, const char * user) { int pam_error; NTSTATUS nt_status = NT_STATUS_ACCOUNT_DISABLED; @@ -777,7 +777,7 @@ BOOL smb_pam_close_session(char *user, char *tty, char *rhost) * PAM Externally accessible Account handler */ -NTSTATUS smb_pam_accountcheck(char * user) +NTSTATUS smb_pam_accountcheck(const char * user) { NTSTATUS nt_status = NT_STATUS_ACCOUNT_DISABLED; pam_handle_t *pamh = NULL; @@ -873,19 +873,19 @@ BOOL smb_pam_passchange(const char * user, const char * oldpassword, const char #else /* If PAM not used, no PAM restrictions on accounts. */ - NTSTATUS smb_pam_accountcheck(char * user) +NTSTATUS smb_pam_accountcheck(const char * user) { return NT_STATUS_OK; } /* If PAM not used, also no PAM restrictions on sessions. */ - BOOL smb_pam_claim_session(char *user, char *tty, char *rhost) +BOOL smb_pam_claim_session(char *user, char *tty, char *rhost) { return True; } /* If PAM not used, also no PAM restrictions on sessions. */ - BOOL smb_pam_close_session(char *in_user, char *tty, char *rhost) +BOOL smb_pam_close_session(char *in_user, char *tty, char *rhost) { return True; } |