diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-11-17 23:55:13 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-11-20 18:02:17 +0100 |
commit | 8455d5ab61184e0d126fc074a9ce6e98391eb909 (patch) | |
tree | 18ce853602a74e8fc581908d4ff2a83d46dc7dcd /src/db/sysdb.h | |
parent | 25285335d6d41400870e64f07904e899263699f5 (diff) | |
download | sssd-8455d5ab61184e0d126fc074a9ce6e98391eb909.tar.gz sssd-8455d5ab61184e0d126fc074a9ce6e98391eb909.tar.bz2 sssd-8455d5ab61184e0d126fc074a9ce6e98391eb909.zip |
LDAP: Only convert direct parents' ghost attribute to member
https://fedorahosted.org/sssd/ticket/1612
This patch changes the handling of ghost attributes when saving the
actual user entry. Instead of always linking all groups that contained
the ghost attribute with the new user entry, the original member
attributes are now saved in the group object and the user entry is only
linked with its direct parents.
As the member attribute is compared against the originalDN of the user,
if either the originalDN or the originalMember attributes are missing,
the user object is linked with all the groups as a fallback.
The original member attributes are only saved if the LDAP schema
supports nesting.
Diffstat (limited to 'src/db/sysdb.h')
-rw-r--r-- | src/db/sysdb.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h index 6bfe3066..ed00c165 100644 --- a/src/db/sysdb.h +++ b/src/db/sysdb.h @@ -118,6 +118,7 @@ #define SYSDB_ORIG_DN "originalDN" #define SYSDB_ORIG_MODSTAMP "originalModifyTimestamp" #define SYSDB_ORIG_MEMBEROF "originalMemberOf" +#define SYSDB_ORIG_MEMBER "orig_member" #define SYSDB_ORIG_MEMBER_USER "originalMemberUser" #define SYSDB_ORIG_MEMBER_HOST "originalMemberHost" @@ -647,6 +648,7 @@ int sysdb_add_user(struct sysdb_ctx *sysdb, const char *gecos, const char *homedir, const char *shell, + const char *orig_dn, struct sysdb_attrs *attrs, int cache_timeout, time_t now); @@ -693,6 +695,7 @@ int sysdb_store_user(struct sysdb_ctx *sysdb, const char *gecos, const char *homedir, const char *shell, + const char *orig_dn, struct sysdb_attrs *attrs, char **remove_attrs, uint64_t cache_timeout, |