diff options
author | Simo Sorce <idra@samba.org> | 2009-01-11 18:52:48 -0500 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2009-01-11 19:16:10 -0500 |
commit | f947e77d5a16b61092314b79cc5b660f0f897976 (patch) | |
tree | 734cb1413feb352194c174d126d4c505d8435a01 /server/nss/nss_ldb.h | |
parent | 9aaaff891a0125dc1102668a99338530fb07abfa (diff) | |
download | sssd-f947e77d5a16b61092314b79cc5b660f0f897976.tar.gz sssd-f947e77d5a16b61092314b79cc5b660f0f897976.tar.bz2 sssd-f947e77d5a16b61092314b79cc5b660f0f897976.zip |
Use a unified base (temp. dc=sssd), for all domain including LOCAL.
It makes no sense to have internal attribute names user configurable,
remove that option and use macros internally.
Also now always pass the domain name to all nss_ldb_* calls.
Diffstat (limited to 'server/nss/nss_ldb.h')
-rw-r--r-- | server/nss/nss_ldb.h | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/server/nss/nss_ldb.h b/server/nss/nss_ldb.h index eee4344f..8f5b1124 100644 --- a/server/nss/nss_ldb.h +++ b/server/nss/nss_ldb.h @@ -4,40 +4,42 @@ #define NSS_DEF_LDB_FILE "sssd.ldb" -#define NSS_DEF_USER_BASE "cn=users,cn=local" -#define NSS_DEF_GROUP_BASE "cn=groups,cn=local" - -#define NSS_DEF_PWNAM_FILTER "(&(objectclass=user)(uid=%s))" -#define NSS_DEF_PWUID_FILTER "(&(objectclass=user)(uidNumber=%llu))" -#define NSS_DEF_PWENT_FILTER "(objectclass=user)" - -#define NSS_DEF_GRNAM_FILTER "(&(objectclass=group)(cn=%s))" -#define NSS_DEF_GRNA2_FILTER "(&(objectclass=user)(memberof=%s))" -#define NSS_DEF_GRGID_FILTER "(&(objectclass=group)(gidNumber=%llu))" -#define NSS_DEF_GRENT_FILTER "(objectclass=group)" - -#define NSS_DEF_INITGR_FILTER "(&(objectclass=group)(gidNumber=*))" - -#define NSS_DEF_PW_NAME "uid" -#define NSS_DEF_PW_UIDNUM "uidNumber" -#define NSS_DEF_PW_GIDNUM "gidNumber" -#define NSS_DEF_PW_FULLNAME "fullName" -#define NSS_DEF_PW_HOMEDIR "homeDirectory" -#define NSS_DEF_PW_SHELL "loginShell" - -#define NSS_DEF_GR_NAME "cn" -#define NSS_DEF_GR_GIDNUM "gidNumber" -#define NSS_DEF_GR_MEMBER "member" - -#define NSS_DEF_LAST_UPDATE "lastUpdate" - -#define NSS_DEF_PW_ATTRS {NSS_DEF_PW_NAME, NSS_DEF_PW_UIDNUM, \ - NSS_DEF_PW_GIDNUM, NSS_DEF_PW_FULLNAME, \ - NSS_DEF_PW_HOMEDIR, NSS_DEF_PW_SHELL, \ - NSS_DEF_LAST_UPDATE, NULL} -#define NSS_DEF_GRNAM_ATTRS {NSS_DEF_GR_NAME, NSS_DEF_GR_GIDNUM, NSS_DEF_LAST_UPDATE, NULL} -#define NSS_DEF_GRPW_ATTRS {NSS_DEF_PW_NAME, NSS_DEF_LAST_UPDATE, NULL} - -#define NSS_DEF_INITGR_ATTR "memberof" -#define NSS_DEF_INITGR_ATTRS {NSS_DEF_GR_GIDNUM, NSS_DEF_LAST_UPDATE, NULL} +#define NSS_DEF_BASE "dc=sssd" +#define NSS_TMPL_USER_BASE "cn=users,cn=%s,dc=sssd" +#define NSS_TMPL_GROUP_BASE "cn=groups,cn=%s,dc=sssd" + +#define NSS_PWNAM_FILTER "(&(objectclass=user)(uid=%s))" +#define NSS_PWUID_FILTER "(&(objectclass=user)(uidNumber=%llu))" +#define NSS_PWENT_FILTER "(objectclass=user)" + +#define NSS_GRNAM_FILTER "(&(objectclass=group)(cn=%s))" +#define NSS_GRNA2_FILTER "(&(objectclass=user)(memberof=%s))" +#define NSS_GRGID_FILTER "(&(objectclass=group)(gidNumber=%llu))" +#define NSS_GRENT_FILTER "(objectclass=group)" + +#define NSS_INITGR_FILTER "(&(objectclass=group)(gidNumber=*))" + +#define NSS_PW_NAME "uid" +#define NSS_PW_PWD "userPassword" +#define NSS_PW_UIDNUM "uidNumber" +#define NSS_PW_GIDNUM "gidNumber" +#define NSS_PW_FULLNAME "fullName" +#define NSS_PW_HOMEDIR "homeDirectory" +#define NSS_PW_SHELL "loginShell" + +#define NSS_GR_NAME "cn" +#define NSS_GR_GIDNUM "gidNumber" +#define NSS_GR_MEMBER "member" + +#define NSS_LAST_UPDATE "lastUpdate" + +#define NSS_PW_ATTRS {NSS_PW_NAME, NSS_PW_UIDNUM, \ + NSS_PW_GIDNUM, NSS_PW_FULLNAME, \ + NSS_PW_HOMEDIR, NSS_PW_SHELL, \ + NSS_LAST_UPDATE, NULL} +#define NSS_GRNAM_ATTRS {NSS_GR_NAME, NSS_GR_GIDNUM, NSS_LAST_UPDATE, NULL} +#define NSS_GRPW_ATTRS {NSS_PW_NAME, NSS_LAST_UPDATE, NULL} + +#define NSS_INITGR_ATTR "memberof" +#define NSS_INITGR_ATTRS {NSS_GR_GIDNUM, NSS_LAST_UPDATE, NULL} |