#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)); } ry'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-10-21 16:16:07 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-10-24 16:59:55 -0400
commite8d7515a983b5ccf6681db0ade3714e837581a97 (patch)
treefb2231296617e826595ca329771ff7da9eedbd65 /Documentation
parent8861a8209782faffedb6d64572fa968ee9c1c375 (diff)
drm/amdgpu: cancel reset work on fini
Cancel any pending reset work when we tear down the driver. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'Documentation')