diff options
author | des <des@FreeBSD.org> | 2003-12-11 13:55:16 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-12-11 13:55:16 +0000 |
commit | 9c38a557979e384e5fc0e3b85507242bee98321f (patch) | |
tree | 79f074d7b6c050b037a9004caf920936f5c2abf9 /lib/libpam/modules/pam_rhosts/pam_rhosts.c | |
parent | 0b146f01b2bf8034a394e4136235609dddda45bf (diff) | |
download | FreeBSD-src-9c38a557979e384e5fc0e3b85507242bee98321f.zip FreeBSD-src-9c38a557979e384e5fc0e3b85507242bee98321f.tar.gz |
Fix strict aliasing breakage in PAM modules (except pam_krb5, which needs
more work than the others). This should make most modules build with -O2.
Diffstat (limited to 'lib/libpam/modules/pam_rhosts/pam_rhosts.c')
-rw-r--r-- | lib/libpam/modules/pam_rhosts/pam_rhosts.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libpam/modules/pam_rhosts/pam_rhosts.c b/lib/libpam/modules/pam_rhosts/pam_rhosts.c index ab42224..4ba6ade 100644 --- a/lib/libpam/modules/pam_rhosts/pam_rhosts.c +++ b/lib/libpam/modules/pam_rhosts/pam_rhosts.c @@ -54,7 +54,8 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, int argc __unused, const char *argv[] __unused) { struct passwd *pw; - const char *user, *ruser, *rhost; + const char *user; + const void *ruser, *rhost; int err, superuser; err = pam_get_user(pamh, &user, NULL); @@ -67,11 +68,11 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, openpam_get_option(pamh, OPT_ALLOW_ROOT) == NULL) return (PAM_AUTH_ERR); - err = pam_get_item(pamh, PAM_RUSER, (const void **)&ruser); + err = pam_get_item(pamh, PAM_RUSER, &ruser); if (err != PAM_SUCCESS) return (PAM_AUTH_ERR); - err = pam_get_item(pamh, PAM_RHOST, (const void **)&rhost); + err = pam_get_item(pamh, PAM_RHOST, &rhost); if (err != PAM_SUCCESS) return (PAM_AUTH_ERR); |