commit | e0b0d89201bd301f47fbbfcf86545b7e77b16ef3 | [log] [tgz] |
---|---|---|
author | Jens Axboe <jens.axboe@oracle.com> | Tue Dec 08 10:10:14 2009 +0100 |
committer | Jens Axboe <jens.axboe@oracle.com> | Tue Dec 08 10:10:14 2009 +0100 |
tree | cc7d1876b98a859590f117a5005e41bae04391b5 | |
parent | 82830b03d854b8e018241b90c2d9fd83752a3236 [diff] [blame] |
Add support for specifying UID/GID Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fio.c b/fio.c index 7d4c96a..728addd 100644 --- a/fio.c +++ b/fio.c
@@ -1041,6 +1041,15 @@ */ fio_mutex_remove(td->mutex); + if (td->o.uid != -1U && setuid(td->o.uid)) { + td_verror(td, errno, "setuid"); + goto err; + } + if (td->o.gid != -1U && setgid(td->o.gid)) { + td_verror(td, errno, "setgid"); + goto err; + } + /* * May alter parameters that init_io_u() will use, so we need to * do this first.