[Fedora-directory-commits] ldapserver/ldap/servers/slapd modify.c, 1.14, 1.15 pblock.c, 1.10, 1.11 pw_retry.c, 1.6, 1.7 slapi-plugin.h, 1.18, 1.19 slapi-private.h, 1.16, 1.17 ssl.c, 1.13, 1.14
Nathan Kinder (nkinder)
fedora-directory-commits at redhat.com
Fri Oct 5 23:31:10 UTC 2007
- Previous message (by thread): [Fedora-directory-commits] ldapserver/ldap/servers/slapd log.c, 1.17, 1.18 libglobs.c, 1.21, 1.22
- Next message (by thread): [Fedora-directory-commits] ldapserver Makefile.am, 1.59, 1.60 configure.ac, 1.38, 1.39 aclocal.m4, 1.53, 1.54 configure, 1.68, 1.69 missing, 1.40, 1.41 install-sh, 1.40, 1.41 compile, 1.39, 1.40 depcomp, 1.40, 1.41 Makefile.in, 1.73, 1.74 config.sub, 1.39, 1.40 config.guess, 1.39, 1.40
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28865
Modified Files:
modify.c pblock.c pw_retry.c slapi-plugin.h slapi-private.h
ssl.c
Log Message:
Resolves: 268101
Summary: Added new operation flag to skip writing modifiresname and related attributes. Updated password policy internal operations to use this new flag.
Index: modify.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/modify.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- modify.c 10 Nov 2006 23:45:40 -0000 1.14
+++ modify.c 5 Oct 2007 23:31:07 -0000 1.15
@@ -536,7 +536,7 @@
LDAPMod **mods, *pw_mod, **tmpmods = NULL;
Slapi_Mods smods;
Slapi_Mods unhashed_pw_smod;
- int repl_op, internal_op, lastmod;
+ int repl_op, internal_op, lastmod, skip_modified_attrs;
char *unhashed_pw_attr = NULL;
Slapi_Operation *operation;
char errorbuf[BUFSIZ];
@@ -551,6 +551,7 @@
slapi_pblock_get (pb, SLAPI_IS_REPLICATED_OPERATION, &repl_op);
slapi_pblock_get (pb, SLAPI_OPERATION, &operation);
internal_op= operation_is_flag_set(operation, OP_FLAG_INTERNAL);
+ slapi_pblock_get (pb, SLAPI_SKIP_MODIFIED_ATTRS, &skip_modified_attrs);
if (dn == NULL)
{
@@ -667,8 +668,9 @@
/* can get lastmod only after backend is selected */
slapi_pblock_get(pb, SLAPI_BE_LASTMOD, &lastmod);
- /* if this is replication session - leave mod attributes alone */
- if (!repl_op && lastmod)
+ /* if this is replication session or the operation has been
+ * flagged - leave mod attributes alone */
+ if (!repl_op && !skip_modified_attrs && lastmod)
{
modify_update_last_modified_attr(pb, &smods);
}
Index: pblock.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pblock.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- pblock.c 7 Sep 2007 19:08:45 -0000 1.10
+++ pblock.c 5 Oct 2007 23:31:07 -0000 1.11
@@ -360,6 +360,16 @@
case SLAPI_REQUESTOR_ISROOT:
(*(int *)value) = pblock->pb_requestor_isroot;
break;
+ case SLAPI_SKIP_MODIFIED_ATTRS:
+ if(pblock->pb_op==NULL)
+ {
+ (*(int *)value) = 0; /* No Operation -> No skip */
+ }
+ else
+ {
+ (*(int *)value) = (pblock->pb_op->o_flags & OP_FLAG_SKIP_MODIFIED_ATTRS);
+ }
+ break;
case SLAPI_IS_REPLICATED_OPERATION:
if(pblock->pb_op==NULL)
{
Index: pw_retry.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pw_retry.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- pw_retry.c 10 Nov 2006 23:45:40 -0000 1.6
+++ pw_retry.c 5 Oct 2007 23:31:07 -0000 1.7
@@ -226,12 +226,14 @@
if (mods && (slapi_mods_get_num_mods(mods) > 0))
{
pblock_init(&pb);
+ /* We don't want to overwrite the modifiersname, etc. attributes,
+ * so we set a flag for this operation */
slapi_modify_internal_set_pb (&pb, dn,
- slapi_mods_get_ldapmods_byref(mods),
- NULL, /* Controls */
- NULL, /* UniqueID */
- pw_get_componentID(), /* PluginID */
- 0); /* Flags */
+ slapi_mods_get_ldapmods_byref(mods),
+ NULL, /* Controls */
+ NULL, /* UniqueID */
+ pw_get_componentID(), /* PluginID */
+ OP_FLAG_SKIP_MODIFIED_ATTRS); /* Flags */
slapi_modify_internal_pb (&pb);
slapi_pblock_get(&pb, SLAPI_PLUGIN_INTOP_RESULT, &res);
Index: slapi-plugin.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- slapi-plugin.h 4 Oct 2007 16:27:47 -0000 1.18
+++ slapi-plugin.h 5 Oct 2007 23:31:07 -0000 1.19
@@ -1360,6 +1360,7 @@
#define SLAPI_IS_REPLICATED_OPERATION 142
#define SLAPI_IS_MMR_REPLICATED_OPERATION 153
#define SLAPI_IS_LEGACY_REPLICATED_OPERATION 154
+#define SLAPI_SKIP_MODIFIED_ATTRS 155
/* connection */
#define SLAPI_CONN_DN 143
Index: slapi-private.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- slapi-private.h 7 Sep 2007 19:08:45 -0000 1.16
+++ slapi-private.h 5 Oct 2007 23:31:07 -0000 1.17
@@ -380,22 +380,27 @@
/* operation.c */
-#define OP_FLAG_PS 0x0001
-#define OP_FLAG_PS_CHANGESONLY 0x0002
-#define OP_FLAG_GET_EFFECTIVE_RIGHTS 0x0004
-#define OP_FLAG_REPLICATED 0x0008 /* A Replicated Operation */
-#define OP_FLAG_REPL_FIXUP 0x0010 /* A Fixup Operation, generated as a consequence of a Replicated Operation. */
-#define OP_FLAG_INTERNAL 0x0020 /* An operation generated by the core server or a plugin. */
-#define OP_FLAG_ACTION_LOG_ACCESS 0x0040
-#define OP_FLAG_ACTION_LOG_AUDIT 0x0080
-#define OP_FLAG_ACTION_SCHEMA_CHECK 0x0100
-#define OP_FLAG_ACTION_LOG_CHANGES 0x0200
-#define OP_FLAG_ACTION_INVOKE_FOR_REPLOP 0x0400
+#define OP_FLAG_PS 0x00001
+#define OP_FLAG_PS_CHANGESONLY 0x00002
+#define OP_FLAG_GET_EFFECTIVE_RIGHTS 0x00004
+#define OP_FLAG_REPLICATED 0x00008 /* A Replicated Operation */
+#define OP_FLAG_REPL_FIXUP 0x00010 /* A Fixup Operation, generated as a
+ * consequence of a Replicated Operation. */
+#define OP_FLAG_INTERNAL 0x00020 /* An operation generated by the core
+ * server or a plugin. */
+#define OP_FLAG_ACTION_LOG_ACCESS 0x00040
+#define OP_FLAG_ACTION_LOG_AUDIT 0x00080
+#define OP_FLAG_ACTION_SCHEMA_CHECK 0x00100
+#define OP_FLAG_ACTION_LOG_CHANGES 0x00200
+#define OP_FLAG_ACTION_INVOKE_FOR_REPLOP 0x00400
#define OP_FLAG_NEVER_CHAIN SLAPI_OP_FLAG_NEVER_CHAIN /* 0x0800 */
-#define OP_FLAG_TOMBSTONE_ENTRY 0x1000
-#define OP_FLAG_RESURECT_ENTRY 0x2000
-#define OP_FLAG_LEGACY_REPLICATION_DN 0x4000 /* Operation done by legacy replication DN */
-#define OP_FLAG_ACTION_NOLOG 0x8000 /* Do not log the entry in audit log or change log */
+#define OP_FLAG_TOMBSTONE_ENTRY 0x01000
+#define OP_FLAG_RESURECT_ENTRY 0x02000
+#define OP_FLAG_LEGACY_REPLICATION_DN 0x04000 /* Operation done by legacy replication DN */
+#define OP_FLAG_ACTION_NOLOG 0x08000 /* Do not log the entry in audit log or
+ * change log */
+#define OP_FLAG_SKIP_MODIFIED_ATTRS 0x10000 /* Do not update the modifiersname,
+ * modifiedtimestamp, etc. attributes */
CSN *operation_get_csn(Slapi_Operation *op);
void operation_set_csn(Slapi_Operation *op,CSN *csn);
Index: ssl.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/ssl.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ssl.c 29 Jan 2007 23:44:49 -0000 1.13
+++ ssl.c 5 Oct 2007 23:31:07 -0000 1.14
@@ -884,7 +884,7 @@
"slapd_ssl_init2", "tmp dir = %s\n", tmpDir);
rv = SSL_ConfigServerSessionIDCache(0, stimeout, stimeout, tmpDir);
- slapi_ch_free(&tmpDir);
+ slapi_ch_free_string(&tmpDir);
if (rv) {
errorCode = PR_GetError();
if (errorCode == ENOSPC) {
- Previous message (by thread): [Fedora-directory-commits] ldapserver/ldap/servers/slapd log.c, 1.17, 1.18 libglobs.c, 1.21, 1.22
- Next message (by thread): [Fedora-directory-commits] ldapserver Makefile.am, 1.59, 1.60 configure.ac, 1.38, 1.39 aclocal.m4, 1.53, 1.54 configure, 1.68, 1.69 missing, 1.40, 1.41 install-sh, 1.40, 1.41 compile, 1.39, 1.40 depcomp, 1.40, 1.41 Makefile.in, 1.73, 1.74 config.sub, 1.39, 1.40 config.guess, 1.39, 1.40
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fedora-directory-commits
mailing list