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

(-)vixie-cron-4.1/do_command.c (-2 / +13 lines)
Lines 240-251 Link Here
240
			}
240
			}
241
		}
241
		}
242
#else
242
#else
243
		setgid(e->pwd->pw_gid);
243
		
244
		initgroups(usernm, e->pwd->pw_gid);
244
		initgroups(usernm, e->pwd->pw_gid);
245
#if (defined(BSD)) && (BSD >= 199103)
245
#if (defined(BSD)) && (BSD >= 199103)
246
		setlogin(usernm);
246
		setlogin(usernm);
247
#endif /* BSD */
247
#endif /* BSD */
248
		setuid(e->pwd->pw_uid);	/* we aren't root after this... */
248
		// setuid(e->pwd->pw_uid);	/* we aren't root after this... */
249
		
250
	if ( setgid(e->pwd->pw_gid) == -1 ) {
251
		fprintf(stderr,"can't set gid for %s\n", e->pwd->pw_name);
252
		_exit(1);
253
	}
254
		
255
	if ( setuid(e->pwd->pw_uid) == -1 ) {
256
		fprintf(stderr,"can't set uid for %s\n", e->pwd->pw_name);
257
		_exit(1);
258
	}
259
		
249
260
250
#endif /* LOGIN_CAP */
261
#endif /* LOGIN_CAP */
251
		chdir(env_get("HOME", e->envp));
262
		chdir(env_get("HOME", e->envp));

Return to bug 134194