(start_login): give the correct error if exec fails

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9803 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-04-24 23:11:43 +00:00
parent 56cb680b45
commit 4b907b8737

View File

@@ -1276,6 +1276,7 @@ start_login(const char *host, int autologin, char *name)
{
struct arg_val argv;
char *user;
int save_errno;
#ifdef HAVE_UTMPX_H
int pid = getpid();
@@ -1371,9 +1372,9 @@ start_login(const char *host, int autologin, char *name)
sleep(1);
execv(new_login, argv.argv);
save_errno = errno;
syslog(LOG_ERR, "%s: %m\n", new_login);
fatalperror(net, new_login);
fatalperror_errno(net, new_login, save_errno);
/*NOTREACHED*/
}