OSDN Git Service

* mkgroup.c (fetch_current_pgrp_sid): New function to fetch primary
authorcorinna <corinna>
Fri, 15 Aug 2008 13:08:47 +0000 (13:08 +0000)
committercorinna <corinna>
Fri, 15 Aug 2008 13:08:47 +0000 (13:08 +0000)
commit1a4584dd2866411907838d8bc4f5cd3af1dcd0dc
tree0506fb7dc8b270bf4d0d3a4bbcb93fb5487cba0b
parent49ac9671f0cd01311119e620a221cb4c2d3d351c
* mkgroup.c (fetch_current_pgrp_sid): New function to fetch primary
group SID from user token.
(current_group): Move up in file.  Move fetching primary group SID to
fetch_current_pgrp_sid.
(enum_local_groups): Check if current SID is the same as current user's
primary group SID.
(enum_groups): Ditto.
(main): Call fetch_current_pgrp_sid before enumerating groups.  Call
current_group only if current group hasn't been enumerated already.
* mkpasswd.c (fetch_current_user_sid): New function to fetch current
user SID from user token.
(current_user): Move fetching current user SID to
fetch_current_user_sid.
(enum_users): Check if current SID is the same as current user's SID.
(main): Call fetch_current_user_sid before enumerating users.  Call
current_user only if current user hasn't been enumerated already.
winsup/utils/ChangeLog
winsup/utils/mkgroup.c
winsup/utils/mkpasswd.c