diff options
author | Sumit Bose <sbose@redhat.com> | 2009-09-11 11:45:19 +0200 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-09-14 12:08:57 -0400 |
commit | c0393b68aaf02a16d2d7aad50cb0d4cfd18b4f66 (patch) | |
tree | 828dde750013c914456197fb468e912a48878f0d /server/providers | |
parent | 30cd03bbbb9e5d8ca6b2014c4b1daceaf75a7397 (diff) | |
download | sssd-c0393b68aaf02a16d2d7aad50cb0d4cfd18b4f66.tar.gz sssd-c0393b68aaf02a16d2d7aad50cb0d4cfd18b4f66.tar.bz2 sssd-c0393b68aaf02a16d2d7aad50cb0d4cfd18b4f66.zip |
Let the PAM client send its PID
- the client sends the PID as uint32_t and sssd will use uint32_t too
- fix a possible type issue where a uint32_t is sent as int32 in internal
dbus communication
Diffstat (limited to 'server/providers')
-rw-r--r-- | server/providers/data_provider.h | 1 | ||||
-rw-r--r-- | server/providers/dp_auth_util.c | 11 |
2 files changed, 8 insertions, 4 deletions
diff --git a/server/providers/data_provider.h b/server/providers/data_provider.h index 18863409..790194ce 100644 --- a/server/providers/data_provider.h +++ b/server/providers/data_provider.h @@ -110,6 +110,7 @@ struct pam_data { char *rhost; uint8_t *authtok; uint8_t *newauthtok; + uint32_t cli_pid; int pam_status; int response_delay; diff --git a/server/providers/dp_auth_util.c b/server/providers/dp_auth_util.c index 492ac7cf..80e9f167 100644 --- a/server/providers/dp_auth_util.c +++ b/server/providers/dp_auth_util.c @@ -37,6 +37,7 @@ void pam_print_data(int l, struct pam_data *pd) DEBUG(l, ("priv: %d\n", pd->priv)); DEBUG(l, ("pw_uid: %d\n", pd->pw_uid)); DEBUG(l, ("gr_gid: %d\n", pd->gr_gid)); + DEBUG(l, ("cli_pid: %d\n", pd->cli_pid)); } int pam_add_response(struct pam_data *pd, enum response_type type, @@ -76,17 +77,18 @@ bool dp_pack_pam_request(DBusMessage *msg, struct pam_data *pd) DBUS_TYPE_STRING, &(pd->tty), DBUS_TYPE_STRING, &(pd->ruser), DBUS_TYPE_STRING, &(pd->rhost), - DBUS_TYPE_INT32, &(pd->authtok_type), + DBUS_TYPE_UINT32, &(pd->authtok_type), DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &(pd->authtok), (pd->authtok_size), - DBUS_TYPE_INT32, &(pd->newauthtok_type), + DBUS_TYPE_UINT32, &(pd->newauthtok_type), DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &(pd->newauthtok), pd->newauthtok_size, DBUS_TYPE_INT32, &(pd->priv), DBUS_TYPE_INT32, &(pd->pw_uid), DBUS_TYPE_INT32, &(pd->gr_gid), + DBUS_TYPE_UINT32, &(pd->cli_pid), DBUS_TYPE_INVALID); return ret; @@ -104,17 +106,18 @@ bool dp_unpack_pam_request(DBusMessage *msg, struct pam_data *pd, DBusError *dbu DBUS_TYPE_STRING, &(pd->tty), DBUS_TYPE_STRING, &(pd->ruser), DBUS_TYPE_STRING, &(pd->rhost), - DBUS_TYPE_INT32, &(pd->authtok_type), + DBUS_TYPE_UINT32, &(pd->authtok_type), DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &(pd->authtok), &(pd->authtok_size), - DBUS_TYPE_INT32, &(pd->newauthtok_type), + DBUS_TYPE_UINT32, &(pd->newauthtok_type), DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &(pd->newauthtok), &(pd->newauthtok_size), DBUS_TYPE_INT32, &(pd->priv), DBUS_TYPE_INT32, &(pd->pw_uid), DBUS_TYPE_INT32, &(pd->gr_gid), + DBUS_TYPE_UINT32, &(pd->cli_pid), DBUS_TYPE_INVALID); return ret; |