if (debug) log_d("now running as uid %d (%s)", u, name);
log_d("now running as uid %d (%s)", u, name);
static int become_user(const char *name){	struct passwd *pw;	uid_t u;	if (name == 0) {		log_d("become_user: name may not be null");		return -1;	}	pw = getpwnam(name);	if (pw == 0) {		log_d("%s: no such user", name);		return -1;	}	u = pw->pw_uid;	if (u == 0) {		log_d("%s: invalid user (uid 0)", name);		return -1;	}	if (initgroups(name, pw->pw_gid) == -1) {		lerror("initgroups");		return -1;	}	if (setgid(pw->pw_gid) == -1) {		lerror("setgid");		return -1;	}	if (setuid(u) == -1) {		lerror("setuid");		return -1;	}	if (debug)		log_d("now running as uid %d (%s)", u, name);	return 0;}