summaryrefslogtreecommitdiff
path: root/server/responder
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-03-05 17:24:18 -0500
committerSimo Sorce <ssorce@redhat.com>2009-03-05 17:55:31 -0500
commit0ae3745711f4c856cf36f4aca07310586f930e1d (patch)
tree75bf8615f743f3c731d3b428989cfd27cc1da5e9 /server/responder
parent0f7963cc85592dc07fca07f2e801956bf204ec33 (diff)
downloadsssd-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')
-rw-r--r--server/responder/nss/nsssrv_cmd.c20
-rw-r--r--server/responder/pam/pam_LOCAL_domain.c14
2 files changed, 17 insertions, 17 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);
diff --git a/server/responder/pam/pam_LOCAL_domain.c b/server/responder/pam/pam_LOCAL_domain.c
index 4671eb9b..b1a459b9 100644
--- a/server/responder/pam/pam_LOCAL_domain.c
+++ b/server/responder/pam/pam_LOCAL_domain.c
@@ -211,7 +211,7 @@ static void do_pam_acct_mgmt(struct LOCAL_request *lreq)
const char *disabled=NULL;
disabled = ldb_msg_find_attr_as_string(lreq->res->msgs[0],
- SYSDB_PW_DISABLED, NULL);
+ SYSDB_DISABLED, NULL);
if (disabled != NULL &&
strncasecmp(disabled, "false",5)!=0 &&
strncasecmp(disabled, "no",2)!=0 ) {
@@ -249,7 +249,7 @@ static void do_pam_chauthtok(struct LOCAL_request *lreq)
NULL_CHECK_OR_JUMP(lreq->mod_attrs, ("sysdb_new_attrs failed.\n"),
lreq->error, ENOMEM, done);
- ret = sysdb_attrs_add_string(lreq->mod_attrs, SYSDB_PW_PWD, new_hash);
+ ret = sysdb_attrs_add_string(lreq->mod_attrs, SYSDB_PWD, new_hash);
NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_attrs_add_string failed.\n"),
lreq->error, ret, done);
@@ -298,7 +298,7 @@ static void pam_handler_callback(void *pvt, int ldb_status,
goto done;
}
- username = ldb_msg_find_attr_as_string(res->msgs[0], SYSDB_PW_NAME, NULL);
+ username = ldb_msg_find_attr_as_string(res->msgs[0], SYSDB_NAME, NULL);
if (strcmp(username, lreq->pd->user) != 0) {
DEBUG(1, ("Expected username [%s] get [%s].\n", lreq->pd->user, username));
lreq->error = EINVAL;
@@ -321,7 +321,7 @@ static void pam_handler_callback(void *pvt, int ldb_status,
lreq->error, ret, done);
memset(lreq->pd->authtok, 0, lreq->pd->authtok_size);
- password = ldb_msg_find_attr_as_string(res->msgs[0], SYSDB_PW_PWD, NULL);
+ password = ldb_msg_find_attr_as_string(res->msgs[0], SYSDB_PWD, NULL);
NULL_CHECK_OR_JUMP(password, ("No password stored.\n"),
lreq->error, ret, done);
DEBUG(4, ("user: [%s], password hash: [%s]\n", username, password));
@@ -385,9 +385,9 @@ int LOCAL_pam_handler(struct cli_ctx *cctx, pam_dp_callback_t callback,
int ret;
struct LOCAL_request *lreq=NULL;
- static const char *attrs[] = {SYSDB_PW_NAME,
- SYSDB_PW_PWD,
- SYSDB_PW_DISABLED,
+ static const char *attrs[] = {SYSDB_NAME,
+ SYSDB_PWD,
+ SYSDB_DISABLED,
SYSDB_USER_ATTR_LAST_LOGIN,
"lastPasswordChange",
"accountExpires",