]> git.proxmox.com Git - mirror_lxc.git/commit
utils: add uid, gid, group convenience wrappers
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 2 Jan 2017 14:12:10 +0000 (15:12 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 7 Jan 2017 10:18:19 +0000 (11:18 +0100)
commitdbaf55a35377e1aa497ffc22de528e76c237b0fd
treea9a074282384d115f58a7b478a09fd422efc003a
parent4484e6f80c75d8e1dcc6bacf304277e330f6d270
utils: add uid, gid, group convenience wrappers

This commit adds lxc_switch_uid_gid() which allows to switch the uid and gid of
a process via setuid() and setgid() and lxc_setgroups() which allows to set
groups via setgroups(). The main advantage is that they nicely log the switches
they perform.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/utils.c
src/lxc/utils.h