]> git.sur5r.net Git - openldap/commitdiff
Must use ch_strdup, not strdup
authorHoward Chu <hyc@openldap.org>
Tue, 29 Aug 2006 01:36:52 +0000 (01:36 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 29 Aug 2006 01:36:52 +0000 (01:36 +0000)
servers/slapd/slapcommon.c
servers/slapd/slappasswd.c

index b9ac4f1beeffe170a9d03e2c55073c4a64948d7a..7ba89edb5c19560b74da374aa1f095aafde48513 100644 (file)
@@ -283,7 +283,7 @@ slap_tool_init(
        while ( (i = getopt( argc, argv, options )) != EOF ) {
                switch ( i ) {
                case 'a':
-                       filterstr = strdup( optarg );
+                       filterstr = ch_strdup( optarg );
                        break;
 
                case 'b':
@@ -320,11 +320,11 @@ slap_tool_init(
                        break;
 
                case 'f':       /* specify a conf file */
-                       conffile = strdup( optarg );
+                       conffile = ch_strdup( optarg );
                        break;
 
                case 'F':       /* specify a conf dir */
-                       confdir = strdup( optarg );
+                       confdir = ch_strdup( optarg );
                        break;
 
                case 'g':       /* disable subordinate glue */
@@ -338,7 +338,7 @@ slap_tool_init(
                        break;
 
                case 'l':       /* LDIF file */
-                       ldiffile = strdup( optarg );
+                       ldiffile = ch_strdup( optarg );
                        break;
 
                case 'M':
@@ -383,7 +383,7 @@ slap_tool_init(
                        if ( tool == SLAPADD )
                                mode |= SLAP_TOOL_NO_SCHEMA_CHECK;
                        else if ( tool == SLAPCAT )
-                               subtree = strdup( optarg );
+                               subtree = ch_strdup( optarg );
                        break;
 
                case 't':       /* turn on truncate */
index ea77df719d0a4ae3fadb6ab742c779382a4ec6c8..6f7f861de45361919c54d8e56eb60f702dfe756f 100644 (file)
@@ -108,7 +108,7 @@ slappasswd( int argc, char *argv[] )
                                return EXIT_FAILURE;
 
                        } else {
-                               scheme = strdup( optarg );
+                               scheme = ch_strdup( optarg );
                        }
                        break;
 
@@ -127,7 +127,7 @@ slappasswd( int argc, char *argv[] )
 
                        } else {
                                char* p;
-                               newpw = strdup( optarg );
+                               newpw = ch_strdup( optarg );
 
                                for( p = optarg; *p != '\0'; p++ ) {
                                        *p = '\0';
@@ -172,7 +172,7 @@ slappasswd( int argc, char *argv[] )
                if( newpw == NULL ) {
                        /* prompt for new password */
                        char *cknewpw;
-                       newpw = strdup(getpassphrase("New password: "));
+                       newpw = ch_strdup(getpassphrase("New password: "));
                        cknewpw = getpassphrase("Re-enter new password: ");
        
                        if( strcmp( newpw, cknewpw )) {