Update NT build.
Project_Dep_Name testavl
End Project Dependency
Begin Project Dependency
- Project_Dep_Name ud
- End Project Dependency
- Begin Project Dependency
Project_Dep_Name slapcat
End Project Dependency
Begin Project Dependency
Begin Project Dependency
Project_Dep_Name ftest
End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ldapwhoami
+ End Project Dependency
}}}
###############################################################################
###############################################################################
+Project: "ldapwhoami"=..\clients\tools\ldapwhoami.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name liblber
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libldap
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name liblutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
Project: "libavl"=..\libraries\libavl\libavl.dsp - Package Owner=<4>
Package=<5>
###############################################################################
-Project: "ud"=..\clients\ud\ud.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libldap
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name liblber
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name liblutil
- End Project Dependency
-}}}
-
-###############################################################################
-
Global:
Package=<5>
}
}
- if ( manageDSAit ) {
- int err;
- LDAPControl c;
- LDAPControl *ctrls[2];
- ctrls[0] = &c;
- ctrls[1] = NULL;
-
- c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT;
- c.ldctl_value.bv_val = NULL;
- c.ldctl_value.bv_len = 0;
- c.ldctl_iscritical = manageDSAit > 1;
+ if ( manageDSAit || noop ) {
+ int err, i = 0;
+ LDAPControl c1, c2;
+ LDAPControl *ctrls[3];
+
+ if ( manageDSAit ) {
+ ctrls[i++] = &c1;
+ ctrls[i] = NULL;
+ c1.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT;
+ c1.ldctl_value.bv_val = NULL;
+ c1.ldctl_value.bv_len = 0;
+ c1.ldctl_iscritical = manageDSAit > 1;
+ }
+
+ if ( noop ) {
+ ctrls[i++] = &c2;
+ ctrls[i] = NULL;
+ c2.ldctl_oid = LDAP_CONTROL_NOOP;
+ c2.ldctl_value.bv_val = NULL;
+ c2.ldctl_value.bv_len = 0;
+ c2.ldctl_iscritical = noop > 1;
+ }
+
err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, ctrls );
if( err != LDAP_OPT_SUCCESS ) {
- fprintf( stderr, "Could not set ManageDSAit %scontrol\n",
- c.ldctl_iscritical ? "critical " : "" );
- if( c.ldctl_iscritical ) {
+ fprintf( stderr, "Could not set %scontrols\n",
+ (c1.ldctl_iscritical || c2.ldctl_iscritical)
+ ? "critical " : "" );
+ if ( c1.ldctl_iscritical && c2.ldctl_iscritical ) {
return EXIT_FAILURE;
}
}
}
}
- if ( manageDSAit ) {
- int err;
- LDAPControl c;
- LDAPControl *ctrls[2];
- ctrls[0] = &c;
- ctrls[1] = NULL;
-
- c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT;
- c.ldctl_value.bv_val = NULL;
- c.ldctl_value.bv_len = 0;
- c.ldctl_iscritical = manageDSAit > 1;
-
+ if ( manageDSAit || noop ) {
+ int err, i = 0;
+ LDAPControl c1, c2;
+ LDAPControl *ctrls[3];
+
+ if ( manageDSAit ) {
+ ctrls[i++] = &c1;
+ ctrls[i] = NULL;
+ c1.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT;
+ c1.ldctl_value.bv_val = NULL;
+ c1.ldctl_value.bv_len = 0;
+ c1.ldctl_iscritical = manageDSAit > 1;
+ }
+
+ if ( noop ) {
+ ctrls[i++] = &c2;
+ ctrls[i] = NULL;
+
+ c2.ldctl_oid = LDAP_CONTROL_NOOP;
+ c2.ldctl_value.bv_val = NULL;
+ c2.ldctl_value.bv_len = 0;
+ c2.ldctl_iscritical = noop > 1;
+ }
+
err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, ctrls );
if( err != LDAP_OPT_SUCCESS ) {
- fprintf( stderr, "Could not set ManageDSAit %scontrol\n",
- c.ldctl_iscritical ? "critical " : "" );
- if( c.ldctl_iscritical ) {
- exit( EXIT_FAILURE );
+ fprintf( stderr, "Could not set %scontrols\n",
+ (c1.ldctl_iscritical || c2.ldctl_iscritical)
+ ? "critical " : "" );
+ if ( c1.ldctl_iscritical && c2.ldctl_iscritical ) {
+ return EXIT_FAILURE;
}
}
}
}
}
- if ( manageDSAit ) {
- int err;
- LDAPControl c;
- LDAPControl *ctrls[2];
- ctrls[0] = &c;
- ctrls[1] = NULL;
-
- c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT;
- c.ldctl_value.bv_val = NULL;
- c.ldctl_value.bv_len = 0;
- c.ldctl_iscritical = manageDSAit > 1;
-
+ if ( manageDSAit || noop ) {
+ int err, i = 0;
+ LDAPControl c1, c2;
+ LDAPControl *ctrls[3];
+
+ if ( manageDSAit ) {
+ ctrls[i++] = &c1;
+ ctrls[i] = NULL;
+ c1.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT;
+ c1.ldctl_value.bv_val = NULL;
+ c1.ldctl_value.bv_len = 0;
+ c1.ldctl_iscritical = manageDSAit > 1;
+ }
+
+ if ( noop ) {
+ ctrls[i++] = &c2;
+ ctrls[i] = NULL;
+
+ c2.ldctl_oid = LDAP_CONTROL_NOOP;
+ c2.ldctl_value.bv_val = NULL;
+ c2.ldctl_value.bv_len = 0;
+ c2.ldctl_iscritical = noop > 1;
+ }
+
err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, ctrls );
if( err != LDAP_OPT_SUCCESS ) {
- fprintf( stderr, "Could not set ManageDSAit %scontrol\n",
- c.ldctl_iscritical ? "critical " : "" );
- if( c.ldctl_iscritical ) {
- exit( EXIT_FAILURE );
+ fprintf( stderr, "Could not set %scontrols\n",
+ (c1.ldctl_iscritical || c2.ldctl_iscritical)
+ ? "critical " : "" );
+ if ( c1.ldctl_iscritical && c2.ldctl_iscritical ) {
+ return EXIT_FAILURE;
}
}
}
}
}
+ if ( manageDSAit || noop ) {
+ int err, i = 0;
+ LDAPControl c1, c2;
+ LDAPControl *ctrls[3];
+
+ if ( manageDSAit ) {
+ ctrls[i++] = &c1;
+ ctrls[i] = NULL;
+ c1.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT;
+ c1.ldctl_value.bv_val = NULL;
+ c1.ldctl_value.bv_len = 0;
+ c1.ldctl_iscritical = manageDSAit > 1;
+ }
+
+ if ( noop ) {
+ ctrls[i++] = &c2;
+ ctrls[i] = NULL;
+
+ c2.ldctl_oid = LDAP_CONTROL_NOOP;
+ c2.ldctl_value.bv_val = NULL;
+ c2.ldctl_value.bv_len = 0;
+ c2.ldctl_iscritical = noop > 1;
+ }
+
+ err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, ctrls );
+
+ if( err != LDAP_OPT_SUCCESS ) {
+ fprintf( stderr, "Could not set %scontrols\n",
+ (c1.ldctl_iscritical || c2.ldctl_iscritical)
+ ? "critical " : "" );
+ if ( c1.ldctl_iscritical && c2.ldctl_iscritical ) {
+ return EXIT_FAILURE;
+ }
+ }
+ }
+
if( user != NULL || oldpw != NULL || newpw != NULL ) {
/* build change password control */
BerElement *ber = ber_alloc_t( LBER_USE_DER );
goto skip;
}
+ if ( manageDSAit || noop ) {
+ int err, i = 0;
+ LDAPControl c1, c2;
+ LDAPControl *ctrls[3];
+
+ if ( manageDSAit ) {
+ ctrls[i++] = &c1;
+ ctrls[i] = NULL;
+ c1.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT;
+ c1.ldctl_value.bv_val = NULL;
+ c1.ldctl_value.bv_len = 0;
+ c1.ldctl_iscritical = manageDSAit > 1;
+ }
+
+ if ( noop ) {
+ ctrls[i++] = &c2;
+ ctrls[i] = NULL;
+
+ c2.ldctl_oid = LDAP_CONTROL_NOOP;
+ c2.ldctl_value.bv_val = NULL;
+ c2.ldctl_value.bv_len = 0;
+ c2.ldctl_iscritical = noop > 1;
+ }
+
+ err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, ctrls );
+
+ if( err != LDAP_OPT_SUCCESS ) {
+ fprintf( stderr, "Could not set %scontrols\n",
+ (c1.ldctl_iscritical || c2.ldctl_iscritical)
+ ? "critical " : "" );
+ if ( c1.ldctl_iscritical && c2.ldctl_iscritical ) {
+ return EXIT_FAILURE;
+ }
+ }
+ }
+
rc = ldap_extended_operation( ld,
LDAP_EXOP_X_WHO_AM_I, NULL,
NULL, NULL, &id );
# End Source File
# Begin Source File
+SOURCE=.\passfile.c
+# End Source File
+# Begin Source File
+
SOURCE=.\passwd.c
# End Source File
# Begin Source File