summaryrefslogtreecommitdiff
path: root/server/responder
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-01-08 17:39:09 +0100
committerStephen Gallagher <sgallagh@redhat.com>2010-02-01 08:50:57 -0500
commit6c9fe712447b4b868c9fe3e1d91df174485d0ada (patch)
tree0df9e97c2046e68a042a5c6e1c20478868eb1e54 /server/responder
parentf64617bcac3c996dc00beddfdadf135d9c8ae049 (diff)
downloadsssd-6c9fe712447b4b868c9fe3e1d91df174485d0ada.tar.gz
sssd-6c9fe712447b4b868c9fe3e1d91df174485d0ada.tar.bz2
sssd-6c9fe712447b4b868c9fe3e1d91df174485d0ada.zip
Avoid 'PAM' at the beginning of define and enum names
Diffstat (limited to 'server/responder')
-rw-r--r--server/responder/pam/pamsrv.c8
-rw-r--r--server/responder/pam/pamsrv_cmd.c26
2 files changed, 17 insertions, 17 deletions
diff --git a/server/responder/pam/pamsrv.c b/server/responder/pam/pamsrv.c
index 626d2c55..84b13dc4 100644
--- a/server/responder/pam/pamsrv.c
+++ b/server/responder/pam/pamsrv.c
@@ -43,8 +43,8 @@
#include "sbus/sbus_client.h"
#include "responder/pam/pamsrv.h"
-#define PAM_SBUS_SERVICE_VERSION 0x0001
-#define PAM_SBUS_SERVICE_NAME "pam"
+#define SSS_PAM_SBUS_SERVICE_VERSION 0x0001
+#define SSS_PAM_SBUS_SERVICE_NAME "pam"
static int service_reload(DBusMessage *message, struct sbus_connection *conn);
@@ -142,8 +142,8 @@ static int pam_process_init(TALLOC_CTX *mem_ctx,
SSS_PAM_SOCKET_NAME,
SSS_PAM_PRIV_SOCKET_NAME,
CONFDB_PAM_CONF_ENTRY,
- PAM_SBUS_SERVICE_NAME,
- PAM_SBUS_SERVICE_VERSION,
+ SSS_PAM_SBUS_SERVICE_NAME,
+ SSS_PAM_SBUS_SERVICE_VERSION,
&monitor_pam_interface,
"PAM", &pam_dp_interface,
&pctx->rctx);
diff --git a/server/responder/pam/pamsrv_cmd.c b/server/responder/pam/pamsrv_cmd.c
index bc768536..f89e73c8 100644
--- a/server/responder/pam/pamsrv_cmd.c
+++ b/server/responder/pam/pamsrv_cmd.c
@@ -96,10 +96,10 @@ static int pam_parse_in_data_v2(struct sss_names_ctx *snctx,
uint32_t size;
char *pam_user;
int ret;
- uint32_t terminator = END_OF_PAM_REQUEST;
+ uint32_t terminator = SSS_END_OF_PAM_REQUEST;
if (blen < 4*sizeof(uint32_t)+2 ||
- ((uint32_t *)body)[0] != START_OF_PAM_REQUEST ||
+ ((uint32_t *)body)[0] != SSS_START_OF_PAM_REQUEST ||
memcmp(&body[blen - sizeof(uint32_t)], &terminator, sizeof(uint32_t)) != 0) {
DEBUG(1, ("Received data is invalid.\n"));
return EINVAL;
@@ -112,7 +112,7 @@ static int pam_parse_in_data_v2(struct sss_names_ctx *snctx,
if (c > blen) return EINVAL;
switch(type) {
- case PAM_ITEM_USER:
+ case SSS_PAM_ITEM_USER:
ret = extract_string(&pam_user, body, blen, &c);
if (ret != EOK) return ret;
@@ -120,39 +120,39 @@ static int pam_parse_in_data_v2(struct sss_names_ctx *snctx,
&pd->domain, &pd->user);
if (ret != EOK) return ret;
break;
- case PAM_ITEM_SERVICE:
+ case SSS_PAM_ITEM_SERVICE:
ret = extract_string(&pd->service, body, blen, &c);
if (ret != EOK) return ret;
break;
- case PAM_ITEM_TTY:
+ case SSS_PAM_ITEM_TTY:
ret = extract_string(&pd->tty, body, blen, &c);
if (ret != EOK) return ret;
break;
- case PAM_ITEM_RUSER:
+ case SSS_PAM_ITEM_RUSER:
ret = extract_string(&pd->ruser, body, blen, &c);
if (ret != EOK) return ret;
break;
- case PAM_ITEM_RHOST:
+ case SSS_PAM_ITEM_RHOST:
ret = extract_string(&pd->rhost, body, blen, &c);
if (ret != EOK) return ret;
break;
- case PAM_ITEM_CLI_PID:
+ case SSS_PAM_ITEM_CLI_PID:
ret = extract_uint32_t(&pd->cli_pid,
body, blen, &c);
if (ret != EOK) return ret;
break;
- case PAM_ITEM_AUTHTOK:
+ case SSS_PAM_ITEM_AUTHTOK:
ret = extract_authtok(&pd->authtok_type, &pd->authtok_size,
&pd->authtok, body, blen, &c);
if (ret != EOK) return ret;
break;
- case PAM_ITEM_NEWAUTHTOK:
+ case SSS_PAM_ITEM_NEWAUTHTOK:
ret = extract_authtok(&pd->newauthtok_type,
&pd->newauthtok_size,
&pd->newauthtok, body, blen, &c);
if (ret != EOK) return ret;
break;
- case END_OF_PAM_REQUEST:
+ case SSS_END_OF_PAM_REQUEST:
if (c != blen) return EINVAL;
break;
default:
@@ -574,7 +574,7 @@ static void pam_reply(struct pam_auth_req *preq)
}
if (pd->domain != NULL) {
- pam_add_response(pd, PAM_DOMAIN_NAME, strlen(pd->domain)+1,
+ pam_add_response(pd, SSS_PAM_DOMAIN_NAME, strlen(pd->domain)+1,
(uint8_t *) pd->domain);
}
@@ -671,7 +671,7 @@ static int pam_forwarder(struct cli_ctx *cctx, int pam_cmd)
size_t blen;
int timeout;
int ret;
- uint32_t terminator = END_OF_PAM_REQUEST;
+ uint32_t terminator = SSS_END_OF_PAM_REQUEST;
preq = talloc_zero(cctx, struct pam_auth_req);
if (!preq) {
return ENOMEM;