diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2002-02-24 20:25:46 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2002-02-24 20:25:46 +0000 |
commit | 127398c6ec7b306839488df3a8a681dfa711dddd (patch) | |
tree | 1e7a5d66247ce1090e83782661c2136d6c254f32 /openbsd-compat/port-aix.c | |
parent | 3107efc12a83e8ae189cc00d92baa4a93424df45 (diff) |
- (bal) Drop Session *s usage in ports-aix.[ch] and pass just what we
need to do the jobs (AIX still does not fully compile, but that is
coming).
Diffstat (limited to 'openbsd-compat/port-aix.c')
-rw-r--r-- | openbsd-compat/port-aix.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c index 245c8a509..31697d7de 100644 --- a/openbsd-compat/port-aix.c +++ b/openbsd-compat/port-aix.c | |||
@@ -2,7 +2,12 @@ | |||
2 | 2 | ||
3 | #ifdef _AIX | 3 | #ifdef _AIX |
4 | 4 | ||
5 | #ifdef HAVE_USERSEC_H | ||
6 | #include <usersec.h> | ||
7 | #endif /* HAVE_USERSEC_H */ | ||
8 | |||
5 | #include <uinfo.h> | 9 | #include <uinfo.h> |
10 | #include <../xmalloc.h> | ||
6 | 11 | ||
7 | /* AIX limits */ | 12 | /* AIX limits */ |
8 | #if defined(HAVE_GETUSERATTR) && !defined(S_UFSIZE_HARD) && defined(S_UFSIZE) | 13 | #if defined(HAVE_GETUSERATTR) && !defined(S_UFSIZE_HARD) && defined(S_UFSIZE) |
@@ -101,17 +106,16 @@ set_limits_from_userattr(char *user) | |||
101 | * actually use this and die if it's not set | 106 | * actually use this and die if it's not set |
102 | */ | 107 | */ |
103 | void | 108 | void |
104 | aix_usrinfo(Session *s) | 109 | aix_usrinfo(struct passwd *pw, char *tty, int ttyfd) |
105 | { | 110 | { |
106 | struct passwd *pw = s->pw; | ||
107 | u_int i; | 111 | u_int i; |
108 | const char *cp=NULL; | 112 | char *cp=NULL; |
109 | 113 | ||
110 | if (s->ttyfd == -1) | 114 | if (ttyfd == -1) |
111 | s->tty[0] = '\0'; | 115 | tty[0] = '\0'; |
112 | cp = xmalloc(22 + strlen(s->tty) + 2 * strlen(pw->pw_name)); | 116 | cp = xmalloc(22 + strlen(tty) + 2 * strlen(pw->pw_name)); |
113 | i = sprintf(cp, "LOGNAME=%s%cNAME=%s%cTTY=%s%c%c", pw->pw_name, 0, | 117 | i = sprintf(cp, "LOGNAME=%s%cNAME=%s%cTTY=%s%c%c", pw->pw_name, 0, |
114 | pw->pw_name, 0, s->tty, 0, 0); | 118 | pw->pw_name, 0, tty, 0, 0); |
115 | if (usrinfo(SETUINFO, cp, i) == -1) | 119 | if (usrinfo(SETUINFO, cp, i) == -1) |
116 | fatal("Couldn't set usrinfo: %s", strerror(errno)); | 120 | fatal("Couldn't set usrinfo: %s", strerror(errno)); |
117 | debug3("AIX/UsrInfo: set len %d", i); | 121 | debug3("AIX/UsrInfo: set len %d", i); |