diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-03-05 17:24:18 -0500 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-03-05 17:55:31 -0500 |
commit | 0ae3745711f4c856cf36f4aca07310586f930e1d (patch) | |
tree | 75bf8615f743f3c731d3b428989cfd27cc1da5e9 /server/responder/nss | |
parent | 0f7963cc85592dc07fca07f2e801956bf204ec33 (diff) | |
download | sssd-0ae3745711f4c856cf36f4aca07310586f930e1d.tar.gz sssd-0ae3745711f4c856cf36f4aca07310586f930e1d.tar.bz2 sssd-0ae3745711f4c856cf36f4aca07310586f930e1d.zip |
Remove _PW_ and _GR_ from SYSDB_ defines
Also unify SYSDB_PW_NAME and SYSDB_GR_NAME in SYSDB_NAME and make it "name"
Diffstat (limited to 'server/responder/nss')
-rw-r--r-- | server/responder/nss/nsssrv_cmd.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/server/responder/nss/nsssrv_cmd.c b/server/responder/nss/nsssrv_cmd.c index 94f92319..46af6d50 100644 --- a/server/responder/nss/nsssrv_cmd.c +++ b/server/responder/nss/nsssrv_cmd.c @@ -192,12 +192,12 @@ static int fill_pwent(struct sss_packet *packet, for (i = 0; i < count; i++) { msg = msgs[i]; - name = ldb_msg_find_attr_as_string(msg, SYSDB_PW_NAME, NULL); - fullname = ldb_msg_find_attr_as_string(msg, SYSDB_PW_FULLNAME, NULL); - homedir = ldb_msg_find_attr_as_string(msg, SYSDB_PW_HOMEDIR, NULL); - shell = ldb_msg_find_attr_as_string(msg, SYSDB_PW_SHELL, NULL); - uid = ldb_msg_find_attr_as_uint64(msg, SYSDB_PW_UIDNUM, 0); - gid = ldb_msg_find_attr_as_uint64(msg, SYSDB_PW_GIDNUM, 0); + name = ldb_msg_find_attr_as_string(msg, SYSDB_NAME, NULL); + fullname = ldb_msg_find_attr_as_string(msg, SYSDB_FULLNAME, NULL); + homedir = ldb_msg_find_attr_as_string(msg, SYSDB_HOMEDIR, NULL); + shell = ldb_msg_find_attr_as_string(msg, SYSDB_SHELL, NULL); + uid = ldb_msg_find_attr_as_uint64(msg, SYSDB_UIDNUM, 0); + gid = ldb_msg_find_attr_as_uint64(msg, SYSDB_GIDNUM, 0); if (!name || !fullname || !homedir || !shell || !uid || !gid) { DEBUG(1, ("Incomplete user object for %s[%llu]! Skipping\n", @@ -1092,8 +1092,8 @@ static int fill_grent(struct sss_packet *packet, if (get_group) { /* find group name/gid */ - name = ldb_msg_find_attr_as_string(msg, SYSDB_GR_NAME, NULL); - gid = ldb_msg_find_attr_as_uint64(msg, SYSDB_GR_GIDNUM, 0); + name = ldb_msg_find_attr_as_string(msg, SYSDB_NAME, NULL); + gid = ldb_msg_find_attr_as_uint64(msg, SYSDB_GIDNUM, 0); if (!name || !gid) { DEBUG(1, ("Incomplete group object for %s[%llu]! Aborting\n", name?name:"<NULL>", (unsigned long long int)gid)); @@ -1150,7 +1150,7 @@ static int fill_grent(struct sss_packet *packet, continue; } - name = ldb_msg_find_attr_as_string(msg, SYSDB_PW_NAME, NULL); + name = ldb_msg_find_attr_as_string(msg, SYSDB_NAME, NULL); if (!name) { /* last member of previous group found, or error. @@ -2018,7 +2018,7 @@ static void nss_cmd_initgr_callback(void *ptr, int status, sss_packet_get_body(cctx->creq->out, &body, &blen); for (i = 0; i < num; i++) { - gid = ldb_msg_find_attr_as_uint64(res->msgs[i], SYSDB_GR_GIDNUM, 0); + gid = ldb_msg_find_attr_as_uint64(res->msgs[i], SYSDB_GIDNUM, 0); if (!gid) { DEBUG(1, ("Incomplete group object for initgroups! Aborting\n")); sss_packet_set_error(cctx->creq->out, EIO); |