From 2234d49c8a307ee4f11cc544c862a359f76b44ad Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Sat, 19 Jan 2013 15:17:42 +0100 Subject: LDAP: Compare lists of DNs when saving autofs entries https://fedorahosted.org/sssd/ticket/1758 The autofs entries do not have the key as an unique identifier, but rather the full (key, value) tuple as some keys have a special meaning, such as the direct mount key (/-) and may be present in a single map multiple times. Comparing the full DN that contains both the key and the value will allow for working updates if either key or value changes. --- src/db/sysdb_autofs.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/db/sysdb_autofs.h') diff --git a/src/db/sysdb_autofs.h b/src/db/sysdb_autofs.h index 0d130946..e3528ce4 100644 --- a/src/db/sysdb_autofs.h +++ b/src/db/sysdb_autofs.h @@ -65,10 +65,7 @@ sysdb_save_autofsentry(struct sysdb_ctx *sysdb_ctx, struct sysdb_attrs *attrs); errno_t sysdb_del_autofsentry(struct sysdb_ctx *sysdb_ctx, - struct sss_domain_info *domain, - const char *map, - const char *key, - const char *value); + const char *entry_dn); errno_t sysdb_autofs_entries_by_map(TALLOC_CTX *mem_ctx, @@ -89,4 +86,12 @@ errno_t sysdb_invalidate_autofs_maps(struct sysdb_ctx *sysdb, struct sss_domain_info *domain); +char * +sysdb_autofsentry_strdn(TALLOC_CTX *mem_ctx, + struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, + const char *map_name, + const char *entry_name, + const char *entry_value); + #endif /* _SYSDB_AUTOFS_H_ */ -- cgit