diff options
Diffstat (limited to 'source3/pam_smbpass/support.c')
-rw-r--r-- | source3/pam_smbpass/support.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/source3/pam_smbpass/support.c b/source3/pam_smbpass/support.c index 007fb922eb..f35a354b7c 100644 --- a/source3/pam_smbpass/support.c +++ b/source3/pam_smbpass/support.c @@ -125,8 +125,7 @@ int make_remark( pam_handle_t * pamh, unsigned int ctrl int set_ctrl( int flags, int argc, const char **argv ) { int i = 0; - static pstring servicesf = dyn_CONFIGFILE; - const char *service_file = servicesf; + const char *service_file = dyn_CONFIGFILE; unsigned int ctrl; ctrl = SMB_DEFAULTS; /* the default selection of options */ @@ -216,32 +215,6 @@ void _cleanup( pam_handle_t * pamh, void *x, int error_status ) x = _pam_delete( (char *) x ); } -/* - * Safe duplication of character strings. "Paranoid"; don't leave - * evidence of old token around for later stack analysis. - */ - -char * smb_xstrdup( const char *x ) -{ - register char *new = NULL; - - if (x != NULL) { - register int i; - - for (i = 0; x[i]; ++i); /* length of string */ - if ((new = malloc(++i)) == NULL) { - i = 0; - _log_err( LOG_CRIT, "out of memory in smb_xstrdup" ); - } else { - while (i-- > 0) { - new[i] = x[i]; - } - } - x = NULL; - } - return new; /* return the duplicate or NULL on error */ -} - /* ************************************************************** * * Useful non-trivial functions * * ************************************************************** */ |