path: root/src/pies.h
diff options
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/pies.h
parent68796f86fe6abae13debf253c0e16b4bac9c1bca (diff)
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/pies.h')
1 files changed, 8 insertions, 4 deletions
diff --git a/src/pies.h b/src/pies.h
index 68a2ff5..e387a56 100644
--- a/src/pies.h
+++ b/src/pies.h
@@ -162,7 +162,7 @@ struct component
struct pies_url *socket_url; /* Socket to listen on
(if mode != pies_comp_exec) */
char *pass_fd_socket; /* Socket to pass fd on
- (if mode == pies_comp_pass_fd) */
+ (if mode == pies_comp_pass_fd) */
unsigned pass_fd_timeout; /* Maximum time to wait for pass_fd socket to
become available. */
pies_acl_t acl;
@@ -223,6 +223,8 @@ size_t depmap_next (pies_depmap_t dmap, pies_depmap_pos_t pos);
int assert_grecs_value_type (grecs_locus_t *locus,
const grecs_value_t *value, int type);
+int str_to_socket_type (const char *str, int *pret);
struct component *component_create (const char *name);
void component_finish (struct component *comp, grecs_locus_t *locus);
struct grecs_keyword *find_component_keyword (const char *ident);
@@ -254,8 +256,8 @@ int register_socket (int socktype, int fd);
int pass_fd (const char *socket, int fd, unsigned time_out);
int create_socket (struct pies_url *url, int socket_type,
const char *user, mode_t umask);
-int disable_socket (int fd);
-int enable_socket (int fd);
+void disable_socket (int fd);
+void enable_socket (int fd);
int parse_limits (limits_record_t *plrec, char *str, char **endp);
@@ -324,4 +326,6 @@ int switch_to_privs (uid_t uid, gid_t gid, gl_list_t retain_groups);
void pies_priv_setup (struct pies_privs *);
void pies_epriv_setup (struct pies_privs *);
+/* inetd.c */
+int inetd_parse_conf (const char *file);

Return to:

Send suggestions and report system problems to the System administrator.