|
|
dc8c34 |
From 1ac087a405c11d27b1150b27d9f075b456000c50 Mon Sep 17 00:00:00 2001
|
|
|
dc8c34 |
From: Noriko Hosoi <nhosoi@totoro.usersys.redhat.com>
|
|
|
dc8c34 |
Date: Wed, 24 Oct 2012 16:13:32 -0700
|
|
|
dc8c34 |
Subject: [PATCH 07/10] Fixing compiler warnings in the posix-winsync plugin
|
|
|
dc8c34 |
|
|
|
dc8c34 |
The commit b9eeb2e1a8e688dfec753e8965d0e5aeb119e638 for Ticket #481
|
|
|
dc8c34 |
"expand nested posix groups" introduced these compiler warnings.
|
|
|
dc8c34 |
|
|
|
dc8c34 |
1) posix-grou-func.c
|
|
|
dc8c34 |
. added missing format strings "%s" in searchUid.
|
|
|
dc8c34 |
. added a function declaration hasObjectClass.
|
|
|
dc8c34 |
. eliminated an unused variable uid_dn_value.
|
|
|
dc8c34 |
2) posix-group-task.c
|
|
|
dc8c34 |
. included "slapi-private.h" for filter_escaped_value.
|
|
|
dc8c34 |
(cherry picked from commit 56ebbb20fa9f8d1add75075fdf421f53ed5348f1)
|
|
|
dc8c34 |
---
|
|
|
dc8c34 |
.../plugins/posix-winsync/posix-group-func.c | 9 +++++----
|
|
|
dc8c34 |
.../plugins/posix-winsync/posix-group-func.h | 2 ++
|
|
|
dc8c34 |
.../plugins/posix-winsync/posix-group-task.c | 1 +
|
|
|
dc8c34 |
3 files changed, 8 insertions(+), 4 deletions(-)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-func.c b/ldap/servers/plugins/posix-winsync/posix-group-func.c
|
|
|
dc8c34 |
index be3a6ec..9ad636f 100644
|
|
|
dc8c34 |
--- a/ldap/servers/plugins/posix-winsync/posix-group-func.c
|
|
|
dc8c34 |
+++ b/ldap/servers/plugins/posix-winsync/posix-group-func.c
|
|
|
dc8c34 |
@@ -28,6 +28,8 @@
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Slapi_Value **
|
|
|
dc8c34 |
valueset_get_valuearray(const Slapi_ValueSet *vs); /* stolen from proto-slap.h */
|
|
|
dc8c34 |
+static int hasObjectClass(Slapi_Entry *entry, const char *objectClass);
|
|
|
dc8c34 |
+
|
|
|
dc8c34 |
static PRMonitor *memberuid_operation_lock = 0;
|
|
|
dc8c34 |
|
|
|
dc8c34 |
void
|
|
|
dc8c34 |
@@ -133,13 +135,13 @@ searchUid(const char *udn)
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
|
|
|
dc8c34 |
slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
|
|
|
dc8c34 |
- "searchUid: About to free entry\n", udn);
|
|
|
dc8c34 |
+ "searchUid: About to free entry (%s)\n", udn);
|
|
|
dc8c34 |
|
|
|
dc8c34 |
slapi_entry_free(entry);
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
|
|
|
dc8c34 |
slapi_log_error(SLAPI_LOG_PLUGIN, POSIX_WINSYNC_PLUGIN_NAME,
|
|
|
dc8c34 |
- "searchUid: <==\n", udn);
|
|
|
dc8c34 |
+ "searchUid(%s): <==\n", udn);
|
|
|
dc8c34 |
|
|
|
dc8c34 |
return uid;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
@@ -260,7 +262,7 @@ smods_has_mod(Slapi_Mods *smods, int modtype, const char *type, const char *val)
|
|
|
dc8c34 |
return rc;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
|
|
|
dc8c34 |
-int
|
|
|
dc8c34 |
+static int
|
|
|
dc8c34 |
hasObjectClass(Slapi_Entry *entry, const char *objectClass)
|
|
|
dc8c34 |
{
|
|
|
dc8c34 |
int rc = 0;
|
|
|
dc8c34 |
@@ -704,7 +706,6 @@ modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int *do_modify)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
if (smod_deluids == NULL) { /* deletion of the last value, deletes the Attribut from entry complete, this operation has no value, so we must look by self */
|
|
|
dc8c34 |
Slapi_Attr * um_attr = NULL; /* Entry attributes */
|
|
|
dc8c34 |
- Slapi_Value * uid_dn_value = NULL; /* Attribute values */
|
|
|
dc8c34 |
int rc = slapi_entry_attr_find(entry, "uniquemember", &um_attr);
|
|
|
dc8c34 |
|
|
|
dc8c34 |
if (rc != 0 || um_attr == NULL) {
|
|
|
dc8c34 |
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-func.h b/ldap/servers/plugins/posix-winsync/posix-group-func.h
|
|
|
dc8c34 |
index 9452022..0f0ae37 100644
|
|
|
dc8c34 |
--- a/ldap/servers/plugins/posix-winsync/posix-group-func.h
|
|
|
dc8c34 |
+++ b/ldap/servers/plugins/posix-winsync/posix-group-func.h
|
|
|
dc8c34 |
@@ -17,5 +17,7 @@ char * searchUid(const char *udn);
|
|
|
dc8c34 |
void memberUidLock();
|
|
|
dc8c34 |
void memberUidUnlock();
|
|
|
dc8c34 |
int memberUidLockInit();
|
|
|
dc8c34 |
+int addUserToGroupMembership(Slapi_Entry *entry);
|
|
|
dc8c34 |
+void propogateDeletionsUpward(Slapi_Entry *, const Slapi_DN *, Slapi_ValueSet*, Slapi_ValueSet *, int);
|
|
|
dc8c34 |
|
|
|
dc8c34 |
#endif
|
|
|
dc8c34 |
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-task.c b/ldap/servers/plugins/posix-winsync/posix-group-task.c
|
|
|
dc8c34 |
index e5385b0..92ac342 100644
|
|
|
dc8c34 |
--- a/ldap/servers/plugins/posix-winsync/posix-group-task.c
|
|
|
dc8c34 |
+++ b/ldap/servers/plugins/posix-winsync/posix-group-task.c
|
|
|
dc8c34 |
@@ -1,4 +1,5 @@
|
|
|
dc8c34 |
#include "slapi-plugin.h"
|
|
|
dc8c34 |
+#include "slapi-private.h"
|
|
|
dc8c34 |
#include "nspr.h"
|
|
|
dc8c34 |
|
|
|
dc8c34 |
#include "posix-wsp-ident.h"
|
|
|
dc8c34 |
--
|
|
|
dc8c34 |
1.7.1
|
|
|
dc8c34 |
|