summaryrefslogtreecommitdiffstats
path: root/server/responder/pam/pamsrv_cmd.c
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-03-04 10:36:19 -0500
committerSimo Sorce <ssorce@redhat.com>2009-03-04 10:42:05 -0500
commit7753f647639fe1cbf14fc1ef268f3fbaa85a2248 (patch)
tree936fbbe3d74e864111b37d6002b46e2397bcc568 /server/responder/pam/pamsrv_cmd.c
parent3257f91e0f39601f36057bec2e0e6c8b5e061cc8 (diff)
downloadsssd-7753f647639fe1cbf14fc1ef268f3fbaa85a2248.tar.gz
sssd-7753f647639fe1cbf14fc1ef268f3fbaa85a2248.tar.xz
sssd-7753f647639fe1cbf14fc1ef268f3fbaa85a2248.zip
Simplify some aspects of pam_LOCAL_domain
Use only one context (the local request) for all functions. Use new helper function in sysdb to set numbers as sysdb_attrs values. Do not use pam_status to report internal errors, use an error variable and check it only when we finally reply. Use sysdb_error_to_errno() to convert and ldb error to errno. Do not free every single buffer allocated, they are all appended to the local request and will be automatically freed once the request is finished.
Diffstat (limited to 'server/responder/pam/pamsrv_cmd.c')
-rw-r--r--server/responder/pam/pamsrv_cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/responder/pam/pamsrv_cmd.c b/server/responder/pam/pamsrv_cmd.c
index 68a82472a..932f226e1 100644
--- a/server/responder/pam/pamsrv_cmd.c
+++ b/server/responder/pam/pamsrv_cmd.c
@@ -82,7 +82,9 @@ static int pam_parse_in_data(uint8_t *body, size_t blen, struct pam_data *pd) {
return EOK;
}
-static void pam_reply(struct cli_ctx *cctx, int pam_status, char *domain) {
+static void pam_reply(struct cli_ctx *cctx,
+ int pam_status, const char *domain)
+{
struct sss_cmd_ctx *nctx;
int32_t ret_status = pam_status;
uint8_t *body;