summaryrefslogtreecommitdiffstats
path: root/libexec/rshd
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/rshd')
-rw-r--r--libexec/rshd/rshd.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c
index e5e07a4..cdc2ce1 100644
--- a/libexec/rshd/rshd.c
+++ b/libexec/rshd/rshd.c
@@ -408,14 +408,8 @@ doit(fromp)
if (errorstr ||
(pwd->pw_expire && time(NULL) >= pwd->pw_expire) ||
(pwd->pw_passwd != 0 && *pwd->pw_passwd != '\0' &&
- iruserok_af(
-#ifdef INET6
- (af == AF_INET6)
- ? (void *)&fromp->su_sin6.sin6_addr :
-#endif
- (void *)&fromp->su_sin.sin_addr,
- pwd->pw_uid == 0,
- remuser, locuser, af) < 0)) {
+ iruserok_sa(fromp, fromp->su_len, pwd->pw_uid == 0,
+ remuser, locuser) < 0)) {
if (__rcmd_errstr)
syslog(LOG_INFO|LOG_AUTH,
"%s@%s as %s: permission denied (%s). cmd='%.80s'",
OpenPOWER on IntegriCloud