]> git.sur5r.net Git - openldap/blobdiff - clients/tools/ldapmodrdn.c
Rework saslRegex code (not yet tested)
[openldap] / clients / tools / ldapmodrdn.c
index e3475e5553d5552bd5d3b6ba2768a49bc8378fef..b5d2d5928388694bc56d83837f6c464dc4dc7cb1 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /* ldapmodrdn.c - generic program to modify an entry's RDN using LDAP.
@@ -29,6 +29,7 @@
 #include <ac/unistd.h>
 
 #include <ldap.h>
+#include "lutil.h"
 #include "lutil_ldap.h"
 #include "ldap_defaults.h"
 
@@ -82,7 +83,7 @@ usage( const char *s )
 "  -k         use Kerberos authentication\n"
 "  -K         like -k, but do only step 1 of the Kerberos bind\n"
 "  -M         enable Manage DSA IT control (-MM to make critical)\n"
-"  -n         show what would be done but don't actually search\n"
+"  -n         show what would be done but don't actually update\n"
 "  -O props   SASL security properties\n"
 "  -p port    port on LDAP server\n"
 "  -P version procotol version (default: 3)\n"
@@ -116,7 +117,7 @@ main(int argc, char **argv)
     authmethod = -1;
        version = -1;
 
-    prog = (prog = strrchr(argv[0], *LDAP_DIRSEP)) == NULL ? argv[0] : prog + 1;
+    prog = lutil_progname( "ldapmodrdn", argc, argv );
 
     while (( i = getopt( argc, argv, "cf:rs:"
                "Cd:D:h:H:IkKMnO:p:P:QR:U:vw:WxX:Y:Z" )) != EOF )
@@ -547,7 +548,7 @@ main(int argc, char **argv)
 
                ld = ldap_init( ldaphost, ldapport );
                if( ld == NULL ) {
-                       perror("ldapsearch: ldap_init");
+                       perror("ldapmodify: ldap_init");
                        return EXIT_FAILURE;
                }