diff options
Diffstat (limited to 'xutils.c')
-rw-r--r-- | xutils.c | 14 |
1 files changed, 0 insertions, 14 deletions
@@ -201,20 +201,6 @@ u32 wireless_bitrate(const char *ifname) return rate_in_mbit; } -void drop_privileges(bool enforce, uid_t uid, gid_t gid) -{ - if (enforce) { - if (uid == getuid()) - panic("Uid cannot be the same as the current user!\n"); - if (gid == getgid()) - panic("Gid cannot be the same as the current user!\n"); - } - if (setgid(gid) != 0) - panic("Unable to drop group privileges: %s!\n", strerror(errno)); - if (setuid(uid) != 0) - panic("Unable to drop user privileges: %s!\n", strerror(errno)); -} - int get_system_socket_mem(int which) { int fd, val = -1; |