diff options
author | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-18 21:06:08 +0000 |
---|---|---|
committer | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-30 14:14:49 +0200 |
commit | ef370b0967024ced9296ff2028abc1b154c0a951 (patch) | |
tree | 243a6780f32ae32699d3c5b96e77556518c97093 /process.c | |
parent | 56d301e212ac1964223cff8ef9c34889cb1a6e75 (diff) |
Set the owner of process directories.
* process.c (process_make_node): Use the owner_uid from the
procinfo structure to set the owner of the created directory.
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -67,6 +67,7 @@ process_make_node (process_t procserv, pid_t pid, const struct procinfo *info) { NULL, } }; struct process_node *pn; + struct node *np; pn = malloc (sizeof *pn); if (! pn) @@ -76,7 +77,10 @@ process_make_node (process_t procserv, pid_t pid, const struct procinfo *info) pn->pid = pid; memcpy (&pn->info, info, sizeof pn->info); - return procfs_dir_make_node (entries, pn, process_cleanup); + np = procfs_dir_make_node (entries, pn, process_cleanup); + np->nn_stat.st_uid = pn->info.owner; + + return np; } error_t |