/*
* Portions Copyright 1998 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Copyright (c) 1990 Regents of the University of Michigan.
* All rights reserved.
*
* modify.c
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include <stdio.h>
#include <string.h>
#ifdef MACOS
#include "macos.h"
#endif /* MACOS */
#endif
#include "lber.h"
#include "ldap.h"
#include "ldap-private.h"
#include "ldap-int.h"
{
int i, rc;
/*
* A modify request looks like this:
* ModifyRequest ::= SEQUENCE {
* object DistinguishedName,
* modifications SEQUENCE OF SEQUENCE {
* operation ENUMERATED {
* add (0),
* delete (1),
* replace (2)
* },
* modification SEQUENCE {
* type AttributeType,
* values SET OF AttributeValue
* }
* }
* }
*/
/* create a message to send */
return( NULLBER );
}
== -1 ) {
return( NULLBER );
}
/* for each modification to be performed... */
} else {
}
if ( rc == -1 ) {
return( NULLBER );
}
}
return( NULLBER );
}
/* LDAPv3 */
/* Code controls if any */
if (serverctrls && serverctrls[0]) {
return( NULLBER );
}
/* Otherwise, is there any global server ctrls ? */
return( NULLBER );
}
}
return( NULLBER );
}
return (ber);
}
/*
* ldap_modify - initiate an ldap (and X.500) modify operation. Parameters:
*
* ld LDAP descriptor
* dn DN of the object to modify
* mods List of modifications to make. This is null-terminated
* array of struct ldapmod's, specifying the modifications
* to perform.
*
* Example:
* LDAPMod *mods[] = {
* { LDAP_MOD_ADD, "cn", { "babs jensen", "babs", 0 } },
* { LDAP_MOD_REPLACE, "sn", { "jensen", 0 } },
* 0
* }
* msgid = ldap_modify( ld, dn, mods );
*/
int
{
int rv;
#ifdef _REENTRANT
#endif
#ifdef _REENTRANT
#endif
return (-1);
}
/* send the message */
#ifdef _REENTRANT
#endif
return ( rv );
}
int
{
int msgid;
}
/* ldapv3 API extensions */
{
int i, rc;
int rv;
#ifdef _REENTRANT
#endif
if (rv == LDAP_SUCCESS)
rv = LDAP_OTHER;
#ifdef _REENTRANT
#endif
return (rv);
}
/* send the message */
if (rv == -1){
if (rv == LDAP_SUCCESS){
rv = LDAP_OTHER;
}
#ifdef _REENTRANT
#endif
return (rv);
}
#ifdef _REENTRANT
#endif
return ( LDAP_SUCCESS );
}
{
int msgid;
return (retcode);
#ifdef _REENTRANT
#endif
if (retcode == LDAP_SUCCESS)
#ifdef _REENTRANT
#endif
return (retcode);
}