Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 339338
Collapse All | Expand All

(-)mingetty.c.orig (-6 / +14 lines)
Lines 431-442 int main (int argc, char **argv) Link Here
431
		while ((logname = get_logname ()) == 0)
431
		while ((logname = get_logname ()) == 0)
432
			/* do nothing */ ;
432
			/* do nothing */ ;
433
433
434
	if (ch_root)
434
	if (ch_root) {
435
		chroot (ch_root);
435
		if (chroot (ch_root))
436
	if (ch_dir)
436
			error ("chroot(): %s", strerror (errno));
437
		chdir (ch_dir);
437
		if (chdir("/"))
438
	if (priority)
438
			error ("chdir(\"/\"): %s", strerror (errno));
439
		nice (priority);
439
	}
440
	if (ch_dir) {
441
		if (chdir (ch_dir))
442
			error ("chdir(): %s", strerror (errno));
443
	}
444
	if (priority) {
445
		if (nice (priority))
446
			error ("nice(): %s", strerror (errno));
447
	}
440
448
441
	execl (loginprog, loginprog, autologin? "-f" : "--", logname, NULL);
449
	execl (loginprog, loginprog, autologin? "-f" : "--", logname, NULL);
442
	error ("%s: can't exec %s: %s", tty, loginprog, strerror (errno));
450
	error ("%s: can't exec %s: %s", tty, loginprog, strerror (errno));

Return to bug 339338