summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-02-24 20:25:46 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-02-24 20:25:46 +0000
commit127398c6ec7b306839488df3a8a681dfa711dddd (patch)
tree1e7a5d66247ce1090e83782661c2136d6c254f32
parent3107efc12a83e8ae189cc00d92baa4a93424df45 (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).
-rw-r--r--ChangeLog9
-rw-r--r--openbsd-compat/port-aix.c18
-rw-r--r--openbsd-compat/port-aix.h2
3 files changed, 19 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index f1e396784..db5bb5341 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
120020224
2 - (bal) Drop Session *s usage in ports-aix.[ch] and pass just what we
3 need to do the jobs (AIX still does not fully compile, but that is
4 coming).
5
120020221 620020221
2 - (bal) Minor session.c for cygwin. mispelt 'is_winnt' variable. 7 - (bal) Minor session.c fixup for cygwin. mispelt 'is_winnt' variable.
3 8
420020219 920020219
5 - (djm) OpenBSD CVS Sync 10 - (djm) OpenBSD CVS Sync
@@ -7656,4 +7661,4 @@
7656 - Wrote replacements for strlcpy and mkdtemp 7661 - Wrote replacements for strlcpy and mkdtemp
7657 - Released 1.0pre1 7662 - Released 1.0pre1
7658 7663
7659$Id: ChangeLog,v 1.1870 2002/02/21 15:37:02 mouring Exp $ 7664$Id: ChangeLog,v 1.1871 2002/02/24 20:25:46 mouring Exp $
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 */
103void 108void
104aix_usrinfo(Session *s) 109aix_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);
diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h
index 891b27add..b5647e7ab 100644
--- a/openbsd-compat/port-aix.h
+++ b/openbsd-compat/port-aix.h
@@ -5,6 +5,6 @@ void set_limit(char *user, char *soft, char *hard, int resource, int mult);
5void set_limits_from_userattr(char *user); 5void set_limits_from_userattr(char *user);
6#endif /* HAVE_GETUSERATTR */ 6#endif /* HAVE_GETUSERATTR */
7 7
8void aix_usrinfo(Session *s); 8void aix_usrinfo(struct passwd *pw, char *tty, int ttyfd)
9 9
10#endif /* _AIX */ 10#endif /* _AIX */