aboutsummaryrefslogtreecommitdiff
path: root/src/userprivs.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-11-24 13:38:52 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-11-24 14:04:31 +0200
commite6772c4d68849cfdb4547a59bc51cb6dd0acd2c6 (patch)
tree72c0baa79455c9008df3f137a11117772b321a52 /src/userprivs.c
parent68796f86fe6abae13debf253c0e16b4bac9c1bca (diff)
downloadpies-e6772c4d68849cfdb4547a59bc51cb6dd0acd2c6.tar.gz
pies-e6772c4d68849cfdb4547a59bc51cb6dd0acd2c6.tar.bz2
Implement parsing of inetd.conf files.
* src/Makefile.am (pies_SOURCES): Add inetd.c. * src/inetd.c: New file. * src/pies.c (inetd_mode): New global. (str_to_socket_type): New function. (_cb_socket_type): Use str_to_socket_type. (_cm_include_meta1): Rename to _cb_include_meta1. (_cb_include_inetd): New function. (pies_keywords): New keyword "include-inetd". (options): New option --inetd. (main): Handle inetd mode. * src/pies.h (str_to_socket_type): New proto. (disable_socket, enable_socket): Fix return type. * src/progman.c (redirect_to_file): Avoid coredump on privs.user == NULL. (open_redirector,env_setup) (progman_start,run_command): Remove unneeded variable. (progman_start): Fix diagnostic message. * src/socket.c (disable_socket, enable_socket): Fix return type. Do nothing if fd < 0. * src/userprivs.c (switch_to_privs): Allow to pass uid==0.
Diffstat (limited to 'src/userprivs.c')
-rw-r--r--src/userprivs.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/userprivs.c b/src/userprivs.c
index 399e229..ba7494f 100644
--- a/src/userprivs.c
+++ b/src/userprivs.c
@@ -89,12 +89,6 @@ switch_to_privs (uid_t uid, gid_t gid, gl_list_t retain_groups)
gid_t *emptygidset;
size_t size = 1, j = 1;
- if (uid == 0)
- {
- logmsg (LOG_ERR, _("refusing to run as root"));
- return 1;
- }
-
/* Create a list of supplementary groups */
size = 1 + (retain_groups ? gl_list_size (retain_groups) : 0);
emptygidset = xcalloc (size, sizeof emptygidset[0]);

Return to:

Send suggestions and report system problems to the System administrator.