Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 171889 | Differences between
and this patch

Collapse All | Expand All

(-)krb5-1.5.2.orig/src/appl/telnet/telnetd/state.c (-1 / +2 lines)
Lines 1665-1671 Link Here
1665
	    strcmp(varp, "RESOLV_HOST_CONF") && /* linux */
1665
	    strcmp(varp, "RESOLV_HOST_CONF") && /* linux */
1666
	    strcmp(varp, "NLSPATH") && /* locale stuff */
1666
	    strcmp(varp, "NLSPATH") && /* locale stuff */
1667
	    strncmp(varp, "LC_", strlen("LC_")) && /* locale stuff */
1667
	    strncmp(varp, "LC_", strlen("LC_")) && /* locale stuff */
1668
	    strcmp(varp, "IFS")) {
1668
	    strcmp(varp, "IFS") &&
1669
		!strchr(varp, '-')) {
1669
		return 1;
1670
		return 1;
1670
	} else {
1671
	} else {
1671
		syslog(LOG_INFO, "Rejected the attempt to modify the environment variable \"%s\"", varp);
1672
		syslog(LOG_INFO, "Rejected the attempt to modify the environment variable \"%s\"", varp);
(-)krb5-1.5.2.orig/src/appl/telnet/telnetd/sys_term.c (-2 / +20 lines)
Lines 1287-1292 Link Here
1287
#endif
1287
#endif
1288
#if	defined (AUTHENTICATION)
1288
#if	defined (AUTHENTICATION)
1289
	if (auth_level >= 0 && autologin == AUTH_VALID) {
1289
	if (auth_level >= 0 && autologin == AUTH_VALID) {
1290
		if (name[0] == '-') {
1291
			/* Authenticated and authorized to log in to an account
1292
			 * starting with '-'?  Even if that unlikely case comes
1293
			 * to pass, the current program will not patse the
1294
			 * resulting command line properly.
1295
			 */
1296
			syslog(LOG_ERR, "user name can not start with '-'");
1297
			fatal(net, "user name can not start with '-'");
1298
			exit(1);
1299
		}
1290
# if	!defined(NO_LOGIN_F)
1300
# if	!defined(NO_LOGIN_F)
1291
#if	defined(LOGIN_CAP_F)
1301
#if	defined(LOGIN_CAP_F)
1292
		argv = addarg(argv, "-F");
1302
		argv = addarg(argv, "-F");
Lines 1377-1388 Link Here
1377
	} else
1387
	} else
1378
#endif
1388
#endif
1379
	if (getenv("USER")) {
1389
	if (getenv("USER")) {
1380
		argv = addarg(argv, getenv("USER"));
1390
		char *user = getenv("USER");
1391
		if (user[0] == '-') {
1392
			/* "telnet -l-x ..." */
1393
			syslog(LOG_ERR, "user name cannot start with '-'");
1394
			fatal(net, "user name cannot start with '-'");
1395
			exit(1);
1396
		}
1397
		argv = addarg(argv, user);
1381
#if	defined(LOGIN_ARGS) && defined(NO_LOGIN_P)
1398
#if	defined(LOGIN_ARGS) && defined(NO_LOGIN_P)
1382
		{
1399
		{
1383
			register char **cpp;
1400
			register char **cpp;
1384
			for (cpp = environ; *cpp; cpp++)
1401
			for (cpp = environ; *cpp; cpp++)
1385
				argv = addarg(argv, *cpp);
1402
				if ((*cpp[0] != '-')
1403
					argv = addarg(argv, *cpp);
1386
		}
1404
		}
1387
#endif
1405
#endif
1388
		/*
1406
		/*

Return to bug 171889