mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-04 05:20:26 +08:00
018fa93e2b
So far creating cygsids requires to generate an "S-1-..." string which is then converted to a SID by cygsid::getfromstr. Add two new methods: - cygsid::create (DWORD auth, DWORD subauth_count, ...) ... is a variable length list of subauth_count DWORD values being the actual subauths. - cygsid::append (DWORD rid) allows to append a single RID to an alreaday constituted SID. * security.h (cygsid::create): Declare public. (cygsid::append): Ditto. * sec_helper.cc (cygsid::create): Implement. (cygsid::append): Implement. * uinfo.cc (pwdgrp::fetch_account_from_windows): Use both new methods as appropriate. Drop setting csid from string. Create SID strings for printing SIDs only. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at http://cygwin.com You might especially be interested in http://cygwin.com/faq/faq.programming.html#faq.programming.building-cygwin