[Samba] Wbinfo -Y couldn't work with idmap_rid for BUILTIN groups
Li, Ying (ESG)
ying.li2 at hp.com
Mon Aug 29 22:51:58 GMT 2005
Here is a patch for BUILTIN group sid/gid mapping in idmap_rid. It works
to me.
#>cd samba-3.0.14a/source/sam
#>diff -C3 idmap_rid.c idmap_rid.c_new
*** idmap_rid.c Fri Mar 11 05:47:05 2005
--- idmap_rid.c_new Mon Aug 29 15:42:50 2005
***************
*** 459,466 ****
fstring sid_string;
int i;
uint32 rid;
! DOM_SID sidstr;
/* check if we have a mapping for the sid */
for (i=0; i<trust.number; i++) {
if (!trust.dom[i].sid) {
--- 459,470 ----
fstring sid_string;
int i;
uint32 rid;
! DOM_SID sidstr, sidbuiltin;
+ string_to_sid(&sidbuiltin, "S-1-5-32");
+ if ( sid_compare_domain(sid, &sidbuiltin) == 0 ) {
+ i=0;
+ } else {
/* check if we have a mapping for the sid */
for (i=0; i<trust.number; i++) {
if (!trust.dom[i].sid) {
***************
*** 469,474 ****
--- 473,479 ----
string_to_sid(&sidstr, trust.dom[i].sid);
if ( sid_compare_domain(sid, &sidstr) == 0 )
break;
+ }
}
More information about the samba
mailing list