]> git.sur5r.net Git - openldap/blobdiff - clients/tools/ldapmodrdn.c
ITS#3755 silence strict-aliasing warnings
[openldap] / clients / tools / ldapmodrdn.c
index e7c054b53d9c45109557c53d9e25704cdee28072..2841d7e087534a9f1dbcd6bd27df94f7585f02db 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * Portions Copyright 1998-2003 Kurt D. Zeilenga.
  * Portions Copyright 1998-2001 Net Boolean Incorporated.
  * Portions Copyright 2001-2003 IBM Corporation.
@@ -52,6 +52,7 @@
 #include <ac/ctype.h>
 #include <ac/string.h>
 #include <ac/unistd.h>
+#include <ac/socket.h>
 #include <ac/time.h>
 
 #include <ldap.h>
@@ -154,7 +155,7 @@ main(int argc, char **argv)
     LDAP               *ld;
        int             rc, retval, havedn;
 
-    tool_init();
+    tool_init( TOOL_MODRDN );
     prog = lutil_progname( "ldapmodrdn", argc, argv );
 
        tool_args( argc, argv );
@@ -198,9 +199,7 @@ main(int argc, char **argv)
 
        tool_bind( ld );
 
-       if ( assertion || authzid || manageDSAit || noop ) {
-               tool_server_controls( ld, NULL, 0 );
-       }
+       tool_server_controls( ld, NULL, 0 );
 
     retval = rc = 0;
     if (havedn)
@@ -253,7 +252,7 @@ static int domodrdn(
                }
        }
 
-       if( not ) return LDAP_SUCCESS;
+       if( dont ) return LDAP_SUCCESS;
 
        rc = ldap_rename( ld, dn, rdn, newSuperior, remove,
                NULL, NULL, &id );