nfqws,tpws: use initgroups() if --user specified

This commit is contained in:
bol-van
2025-06-11 20:15:43 +03:00
parent f3d48b7160
commit f09d918b40
11 changed files with 125 additions and 97 deletions

View File

@@ -117,8 +117,9 @@ struct params_s
bool fix_seg_avail;
bool no_resolve;
bool skip_nodelay;
bool droproot;
bool daemon;
bool droproot;
char *user;
uid_t uid;
gid_t gid[MAX_GIDS];
int gid_count;
@@ -155,6 +156,10 @@ struct params_s
extern struct params_s params;
extern const char *progname;
#if !defined( __OpenBSD__) && !defined(__ANDROID__)
void cleanup_args(struct params_s *params);
#endif
void cleanup_params(struct params_s *params);
int DLOG(const char *format, int level, ...);
int DLOG_CONDUP(const char *format, ...);