+
+const char options[] = "a:As:S"
+ "Cd:D:e:h:H:InO:p:QR:U:vVw:WxX:Y:Z";
+
+int
+handle_private_option( int i )
+{
+ switch ( i ) {
+#if 0
+ int crit;
+ char *control, *cvalue;
+ case 'E': /* passwd controls */
+ if( protocol == LDAP_VERSION2 ) {
+ fprintf( stderr, "%s: -E incompatible with LDAPv%d\n",
+ prog, protocol );
+ exit( EXIT_FAILURE );
+ }
+
+ /* should be extended to support comma separated list of
+ * [!]key[=value] parameters, e.g. -E !foo,bar=567
+ */
+
+ crit = 0;
+ cvalue = NULL;
+ if( optarg[0] == '!' ) {
+ crit = 1;
+ optarg++;
+ }
+
+ control = strdup( optarg );
+ if ( (cvalue = strchr( control, '=' )) != NULL ) {
+ *cvalue++ = '\0';
+ }
+ fprintf( stderr, "Invalid passwd control name: %s\n", control );
+ usage();
+#endif
+
+ case 'a': /* old password (secret) */
+ oldpw = strdup (optarg);
+
+ {
+ char* p;
+ for( p = optarg; *p != '\0'; p++ ) {
+ *p = '\0';
+ }
+ }
+ break;
+
+ case 'A': /* prompt for old password */
+ want_oldpw++;
+ break;
+
+ case 's': /* new password (secret) */
+ newpw = strdup (optarg);
+ {
+ char* p;
+ for( p = optarg; *p != '\0'; p++ ) {
+ *p = '\0';
+ }
+ }
+ break;
+
+ case 'S': /* prompt for user password */
+ want_newpw++;
+ break;
+
+ default:
+ return 0;
+ }
+ return 1;
+}
+
+