diff options
author | Dave Brolley <brolley@redhat.com> | 2009-11-25 14:14:03 -0500 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-11-25 14:14:03 -0500 |
commit | 0da3e7a0e77120670cb69c55ad5418f2bf2afb9d (patch) | |
tree | 3ef463df086114aeb42630db819ff9d048712b97 /util.cxx | |
parent | ff3576d585aee3140b41bb77a0e8e4063e704f43 (diff) | |
download | systemtap-steved-0da3e7a0e77120670cb69c55ad5418f2bf2afb9d.tar.gz systemtap-steved-0da3e7a0e77120670cb69c55ad5418f2bf2afb9d.tar.xz systemtap-steved-0da3e7a0e77120670cb69c55ad5418f2bf2afb9d.zip |
- Allow root, the owner of the uprobes build directory and the members of the
group owner of the uprobes buld directory to build uprobes.ko.
- When building uprobes.ko, make all generated files writable by the group
owner of the uprobes build directory.
- Don't change the group owner of the uprobes build directory during
'make install'
Diffstat (limited to 'util.cxx')
-rw-r--r-- | util.cxx | 17 |
1 files changed, 3 insertions, 14 deletions
@@ -189,24 +189,13 @@ remove_file_or_dir (const char *name) return 0; } -// Determine whether the current user is in the given group. +// Determine whether the current user is in the given group +// by gid. bool -in_group (const char *gname) +in_group_id (gid_t target_gid) { gid_t gid, gidlist[NGROUPS_MAX]; - gid_t target_gid; int i, ngids; - struct group *group; - - // Lookup the gid for the target group - errno = 0; - group = getgrnam(gname); - - // If we couldn't find the group, then we can't be part of it. - if (group == NULL) - return false; - - target_gid = group->gr_gid; // According to the getgroups() man page, getgroups() may not // return the effective gid, so try to match it first. */ |