summaryrefslogtreecommitdiff
path: root/source3/pam_smbpass/support.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-11 23:44:33 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-11 23:44:33 +0000
commit65cfe6a492b236f49edd591a7e728cbeeed3c344 (patch)
tree260b1b6eccf012db5c3946feee3a6469db62dc55 /source3/pam_smbpass/support.c
parent6526a42558e1fb9ff0b9cea1de70d492e1bc4ce6 (diff)
downloadsamba-65cfe6a492b236f49edd591a7e728cbeeed3c344.tar.gz
samba-65cfe6a492b236f49edd591a7e728cbeeed3c344.tar.bz2
samba-65cfe6a492b236f49edd591a7e728cbeeed3c344.zip
pam_smbpass updates from a.bokovoy@sam-solutions.net
(This used to be commit 016e203a2c5286d8b48ab3eff0226affc203deaf)
Diffstat (limited to 'source3/pam_smbpass/support.c')
-rw-r--r--source3/pam_smbpass/support.c29
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 *
* ************************************************************** */