This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
printing owner and group SIDs
- From: "Pierre A. Humblet" <Pierre dot Humblet at ieee dot org>
- To: cygwin-patches at cygwin dot com
- Date: Wed, 26 Feb 2003 00:08:07 -0500
- Subject: printing owner and group SIDs
Corinna,
this patch makes it easy to view owner and group SIDS, e.g.
/> strace ls test3 | fgrep SID
394 243946 [main] ls 319 cygpsid::debug_print: get_sids_info:
group SID = S-1-5-21-1391547877-877281485-1846952604-2655
293 244239 [main] ls 319 cygpsid::debug_print: get_sids_info:
owner SID = S-1-5-21-1391547877-877281485-1846952604-1054
Pierre
2003-02-26 Pierre Humblet <pierre dot humblet at ieee dot org>
* sec_helper.cc (get_sids_info): debug_print owner_sid and group_sid.
Index: sec_helper.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/sec_helper.cc,v
retrieving revision 1.36
diff -u -p -r1.36 sec_helper.cc
--- sec_helper.cc 6 Feb 2003 14:01:54 -0000 1.36
+++ sec_helper.cc 26 Feb 2003 04:03:50 -0000
@@ -193,6 +193,7 @@ get_sids_info (cygpsid owner_sid, cygpsi
struct __group32 *gr = NULL;
bool ret = false;
+ group_sid.debug_print ("get_sids_info: group SID =");
if (group_sid == cygheap->user.groups.pgsid)
*gidret = myself->gid;
else if ((gr = internal_getgrsid (group_sid)))
@@ -200,6 +201,7 @@ get_sids_info (cygpsid owner_sid, cygpsi
else
*gidret = ILLEGAL_GID;
+ owner_sid.debug_print ("get_sids_info: owner SID =");
if (owner_sid == cygheap->user.sid ())
{
*uidret = myself->uid;