#include #include #include "privs.h" #include "die.h" 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)); } ' title='net-next.git Git repository'/>
summaryrefslogtreecommitdiff
path: root/net/xfrm
AgeCommit message (Expand)AuthorFilesLines
2017-02-08gro_cells: move to net/core/gro_cells.cEric Dumazet1-0/+1
2017-02-07net: add confirm_neigh method to dst_opsJulian Anastasov1-0/+19