while ( (i = getopt( argc, argv, options )) != EOF ) {
switch ( i ) {
case 'a':
- filterstr = strdup( optarg );
+ filterstr = ch_strdup( optarg );
break;
case 'b':
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 */
break;
case 'l': /* LDIF file */
- ldiffile = strdup( optarg );
+ ldiffile = ch_strdup( optarg );
break;
case 'M':
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 */
return EXIT_FAILURE;
} else {
- scheme = strdup( optarg );
+ scheme = ch_strdup( optarg );
}
break;
} else {
char* p;
- newpw = strdup( optarg );
+ newpw = ch_strdup( optarg );
for( p = optarg; *p != '\0'; p++ ) {
*p = '\0';
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 )) {