Deleted Added
full compact
port-aix.c (204917) port-aix.c (255767)
1/*
2 *
3 * Copyright (c) 2001 Gert Doering. All rights reserved.
4 * Copyright (c) 2003,2004,2005,2006 Darren Tucker. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 72 unchanged lines hidden (view full) ---

81 cp = xmalloc(len);
82
83 i = snprintf(cp, len, "LOGNAME=%s%cNAME=%s%c", pw->pw_name, '\0',
84 pw->pw_name, '\0');
85 if (usrinfo(SETUINFO, cp, i) == -1)
86 fatal("Couldn't set usrinfo: %s", strerror(errno));
87 debug3("AIX/UsrInfo: set len %d", i);
88
1/*
2 *
3 * Copyright (c) 2001 Gert Doering. All rights reserved.
4 * Copyright (c) 2003,2004,2005,2006 Darren Tucker. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 72 unchanged lines hidden (view full) ---

81 cp = xmalloc(len);
82
83 i = snprintf(cp, len, "LOGNAME=%s%cNAME=%s%c", pw->pw_name, '\0',
84 pw->pw_name, '\0');
85 if (usrinfo(SETUINFO, cp, i) == -1)
86 fatal("Couldn't set usrinfo: %s", strerror(errno));
87 debug3("AIX/UsrInfo: set len %d", i);
88
89 xfree(cp);
89 free(cp);
90}
91
92# ifdef WITH_AIXAUTHENTICATE
93/*
94 * Remove embedded newlines in string (if any).
95 * Used before logging messages returned by AIX authentication functions
96 * so the message is logged on one line.
97 */

--- 112 unchanged lines hidden (view full) ---

210 case 0: /* password not expired */
211 break;
212 case 1: /* expired, password change required */
213 ctxt->force_pwchange = 1;
214 break;
215 default: /* user can't change(2) or other error (-1) */
216 logit("Password can't be changed for user %s: %.100s",
217 name, msg);
90}
91
92# ifdef WITH_AIXAUTHENTICATE
93/*
94 * Remove embedded newlines in string (if any).
95 * Used before logging messages returned by AIX authentication functions
96 * so the message is logged on one line.
97 */

--- 112 unchanged lines hidden (view full) ---

210 case 0: /* password not expired */
211 break;
212 case 1: /* expired, password change required */
213 ctxt->force_pwchange = 1;
214 break;
215 default: /* user can't change(2) or other error (-1) */
216 logit("Password can't be changed for user %s: %.100s",
217 name, msg);
218 if (msg)
219 xfree(msg);
218 free(msg);
220 authsuccess = 0;
221 }
222
223 aix_restoreauthdb();
224 }
225
219 authsuccess = 0;
220 }
221
222 aix_restoreauthdb();
223 }
224
226 if (authmsg != NULL)
227 xfree(authmsg);
225 free(authmsg);
228
229 return authsuccess;
230}
231
232/*
233 * Check if specified account is permitted to log in.
234 * Returns 1 if login is allowed, 0 if not allowed.
235 */

--- 28 unchanged lines hidden (view full) ---

264 buffer_append(loginmsg, msg, strlen(msg));
265 if (msg == NULL)
266 msg = xstrdup("(none)");
267 aix_remove_embedded_newlines(msg);
268 debug3("AIX/loginrestrictions returned %d msg %.100s", result, msg);
269
270 if (!permitted)
271 logit("Login restricted for %s: %.100s", pw->pw_name, msg);
226
227 return authsuccess;
228}
229
230/*
231 * Check if specified account is permitted to log in.
232 * Returns 1 if login is allowed, 0 if not allowed.
233 */

--- 28 unchanged lines hidden (view full) ---

262 buffer_append(loginmsg, msg, strlen(msg));
263 if (msg == NULL)
264 msg = xstrdup("(none)");
265 aix_remove_embedded_newlines(msg);
266 debug3("AIX/loginrestrictions returned %d msg %.100s", result, msg);
267
268 if (!permitted)
269 logit("Login restricted for %s: %.100s", pw->pw_name, msg);
272 xfree(msg);
270 free(msg);
273 return permitted;
274}
275
276int
277sys_auth_record_login(const char *user, const char *host, const char *ttynm,
278 Buffer *loginmsg)
279{
280 char *msg = NULL;

--- 194 unchanged lines hidden ---
271 return permitted;
272}
273
274int
275sys_auth_record_login(const char *user, const char *host, const char *ttynm,
276 Buffer *loginmsg)
277{
278 char *msg = NULL;

--- 194 unchanged lines hidden ---