]> git.sur5r.net Git - openldap/blobdiff - clients/tools/ldappasswd.c
Initial implementation of Kerberos password verification for
[openldap] / clients / tools / ldappasswd.c
index 0deb9f95d9c07a1c6c2c586fcd8d974b1f23eac7..04b4d469c99f0d5e9e8d55435c6e6de421601578 100644 (file)
@@ -28,13 +28,15 @@ usage(const char *s)
 {
        fprintf(stderr,
                "Usage: %s [options] dn\n"
+               "  -A\t\tprompt for old password\n"
+               "  -a secret\told password\n"
                "  -D binddn\tbind dn\n"
                "  -d level\tdebugging level\n"
                "  -h host\tldap server (default: localhost)\n"
                "  -n\t\tmake no modifications\n"
                "  -p port\tldap port\n"
-               "  -s secret\tnew password\n"
                "  -S\t\tprompt for new password\n"
+               "  -s secret\tnew password\n"
                "  -v\t\tincrease verbosity\n"
                "  -W\t\tprompt for bind password\n"
                "  -w passwd\tbind password (for simple authentication)\n"
@@ -244,6 +246,8 @@ main( int argc, char *argv[] )
                        return EXIT_FAILURE;
                }
 
+               ber_printf( ber, "{" /*}*/ );
+
                if( dn != NULL ) {
                        ber_printf( ber, "ts",
                                LDAP_TAG_EXOP_X_MODIFY_PASSWD_ID, dn );
@@ -262,6 +266,8 @@ main( int argc, char *argv[] )
                        free(newpw);
                }
 
+               ber_printf( ber, /*{*/ "}" );
+
                rc = ber_flatten( ber, &bv );
 
                if( rc < 0 ) {
@@ -292,7 +298,7 @@ main( int argc, char *argv[] )
                }
 
                /* we should check the tag */
-               tag = ber_scanf( ber, "a", &s);
+               tag = ber_scanf( ber, "{a}", &s);
 
                if( tag == LBER_ERROR ) {
                        perror( "ber_scanf" );