Red Hat DIRECTORY SERVER 7.1 - PLUG-IN PROGRAMMERS Manual page 119

Table of Contents

Advertisement

Code Example 8-3
sprintf( buf, "This entry was modified with the modattrs
program on %s",
ctime( &now ));
/* Get rid of \n which ctime put on the end of the time string
*/
if ( buf[ strlen( buf ) - 1 ] == '\n' ) {
buf[ strlen( buf ) - 1 ] = '\0';
}
vals1[ 0 ] = buf;
vals1[ 1 ] = NULL;
mod1.mod_values = vals1;
mods[ 0 ] = &mod0;
mods[ 1 ] = &mod1;
mods[ 2 ] = NULL;
/* make the change */
if ( ldap_modify_s( ld, "uid=bjensen,ou=people,l=US,
dc=example,dc=com", mods )
!= LDAP_SUCCESS ) {
ldap_perror( ld, "ldap_modify_s" );
return( 1 );
}
ldap_unbind( ld );
printf( "modification was successful\n" );
return( 0 );
}
LDAP Client Authenticating Using SASL Method (Continued)
Using SASL with an LDAP Client
Chapter 8
Defining Functions for Authentication
117

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 7.1

Table of Contents