mirror of git://anongit.mindrot.org/openssh.git
-Wall
This commit is contained in:
parent
491bbb811a
commit
2d5ac08f13
|
@ -11,7 +11,6 @@
|
|||
o) better -mdoc style;
|
||||
o) typo;
|
||||
o) sort SEE ALSO;
|
||||
|
||||
aaron@ ok
|
||||
- provos@cvs.openbsd.org 2001/06/22 21:27:08
|
||||
[dh.c pathnames.h]
|
||||
|
@ -105,6 +104,7 @@
|
|||
- markus@cvs.openbsd.org 2001/06/24 17:18:31
|
||||
[ttymodes.c]
|
||||
passing modes works fine: debug2->3
|
||||
- (djm) -Wall fix for session.c
|
||||
|
||||
20010622
|
||||
- (stevesk) handle systems without pw_expire and pw_change.
|
||||
|
@ -5789,4 +5789,4 @@
|
|||
- Wrote replacements for strlcpy and mkdtemp
|
||||
- Released 1.0pre1
|
||||
|
||||
$Id: ChangeLog,v 1.1323 2001/06/25 05:24:16 mouring Exp $
|
||||
$Id: ChangeLog,v 1.1324 2001/06/25 07:07:59 djm Exp $
|
||||
|
|
48
session.c
48
session.c
|
@ -607,6 +607,29 @@ do_exec(Session *s, const char *command)
|
|||
original_command = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for quiet login, either .hushlogin or command given.
|
||||
*/
|
||||
static int
|
||||
check_quietlogin(Session *s, const char *command)
|
||||
{
|
||||
char buf[256];
|
||||
struct passwd * pw = s->pw;
|
||||
struct stat st;
|
||||
|
||||
/* Return 1 if .hushlogin exists or a command given. */
|
||||
if (command != NULL)
|
||||
return 1;
|
||||
snprintf(buf, sizeof(buf), "%.200s/.hushlogin", pw->pw_dir);
|
||||
#ifdef HAVE_LOGIN_CAP
|
||||
if (login_getcapbool(lc, "hushlogin", 0) || stat(buf, &st) >= 0)
|
||||
return 1;
|
||||
#else
|
||||
if (stat(buf, &st) >= 0)
|
||||
return 1;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* administrative, login(1)-like work */
|
||||
void
|
||||
|
@ -706,31 +729,6 @@ do_motd(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Check for quiet login, either .hushlogin or command given.
|
||||
*/
|
||||
int
|
||||
check_quietlogin(Session *s, const char *command)
|
||||
{
|
||||
char buf[256];
|
||||
struct passwd * pw = s->pw;
|
||||
struct stat st;
|
||||
|
||||
/* Return 1 if .hushlogin exists or a command given. */
|
||||
if (command != NULL)
|
||||
return 1;
|
||||
snprintf(buf, sizeof(buf), "%.200s/.hushlogin", pw->pw_dir);
|
||||
#ifdef HAVE_LOGIN_CAP
|
||||
if (login_getcapbool(lc, "hushlogin", 0) || stat(buf, &st) >= 0)
|
||||
return 1;
|
||||
#else
|
||||
if (stat(buf, &st) >= 0)
|
||||
return 1;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the value of the given variable in the environment. If the variable
|
||||
* already exists, its value is overriden.
|
||||
|
|
Loading…
Reference in New Issue