예제 #1
0
파일: modrdn.c 프로젝트: ohamada/389ds
void
slapi_rename_internal_set_pb_ext(Slapi_PBlock *pb,
                                 const Slapi_DN *olddn, 
                                 const char *newrdn,  /* normalized */
                                 const Slapi_DN *newsuperior, int deloldrdn, 
                                 LDAPControl **controls, const char *uniqueid,
                                 Slapi_ComponentId *plugin_identity, 
                                 int operation_flags)
{
    Operation *op;
    PR_ASSERT (pb != NULL);
    if (pb == NULL || olddn == NULL || newrdn == NULL)
    {
        slapi_log_error(SLAPI_LOG_FATAL, NULL, 
                        "slapi_rename_internal_set_pb: NULL parameter\n");
        return;
    }

    op = internal_operation_new(SLAPI_OPERATION_MODRDN,operation_flags); 
    slapi_pblock_set(pb, SLAPI_OPERATION, op); 
    slapi_pblock_set(pb, SLAPI_ORIGINAL_TARGET, 
                     (void*)slapi_sdn_get_dn(olddn));
    slapi_pblock_set(pb, SLAPI_MODRDN_TARGET_SDN, (void*)olddn);
    slapi_pblock_set(pb, SLAPI_MODRDN_NEWRDN, (void*)newrdn);
    slapi_pblock_set(pb, SLAPI_MODRDN_NEWSUPERIOR_SDN, (void*)newsuperior);
    slapi_pblock_set(pb, SLAPI_MODRDN_DELOLDRDN, &deloldrdn);
    slapi_pblock_set(pb, SLAPI_CONTROLS_ARG, controls);
       slapi_pblock_set(pb, SLAPI_MODIFY_MODS, NULL);
    if (uniqueid)
    {
        slapi_pblock_set(pb, SLAPI_TARGET_UNIQUEID, (void*)uniqueid);
    }
    slapi_pblock_set(pb, SLAPI_PLUGIN_IDENTITY, plugin_identity);
}
예제 #2
0
파일: delete.c 프로젝트: leto/389-ds
/* Initialize a pblock for a call to slapi_delete_internal_pb() */
void
slapi_delete_internal_set_pb (Slapi_PBlock *pb,
                              const char *rawdn,
                              LDAPControl **controls, const char *uniqueid, 
                              Slapi_ComponentId *plugin_identity, 
                              int operation_flags)
{  
	Operation *op;
	PR_ASSERT (pb != NULL);
	if (pb == NULL || rawdn == NULL)
	{
		slapi_log_error(SLAPI_LOG_FATAL, NULL, 
						"slapi_delete_internal_set_pb: NULL parameter\n");
		return;
	}

	op = internal_operation_new(SLAPI_OPERATION_DELETE,operation_flags);
	slapi_pblock_set(pb, SLAPI_OPERATION, op);
	slapi_pblock_set(pb, SLAPI_ORIGINAL_TARGET, (void*)rawdn);
	slapi_pblock_set(pb, SLAPI_CONTROLS_ARG, controls);
	if (uniqueid)
	{
		slapi_pblock_set(pb, SLAPI_TARGET_UNIQUEID, (void*)uniqueid);
	}
	slapi_pblock_set(pb, SLAPI_PLUGIN_IDENTITY, plugin_identity);
}
예제 #3
0
파일: add.c 프로젝트: Firstyear/ds
/* Initialize a pblock for a call to slapi_add_internal_pb() */
void slapi_add_entry_internal_set_pb (Slapi_PBlock *pb, Slapi_Entry *e, LDAPControl **controls, 
								Slapi_ComponentId *plugin_identity, int operation_flags)
{
	Operation *op;
	PR_ASSERT (pb != NULL);
	if (pb == NULL || e == NULL)
	{
		slapi_log_err(SLAPI_LOG_PLUGIN, NULL, "slapi_add_entry_internal_set_pb: invalid argument\n");
		return;
	}

	op = internal_operation_new(SLAPI_OPERATION_ADD,operation_flags);
	slapi_pblock_set(pb, SLAPI_OPERATION, op);
	slapi_pblock_set(pb, SLAPI_ADD_ENTRY, e);
	slapi_pblock_set(pb, SLAPI_CONTROLS_ARG, controls);
	slapi_pblock_set(pb, SLAPI_PLUGIN_IDENTITY, plugin_identity);
}