From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Fri, 23 Nov 2007 11:55:03 -0500 From: "Caerwyn Jones" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] Acme-SAC fstat issue? In-Reply-To: <1c88e077e0ec2c4353419feb147e821d@terzarima.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1c88e077e0ec2c4353419feb147e821d@terzarima.net> Topicbox-Message-UUID: 097bd254-ead3-11e9-9d60-3106f5b1d025 Here's another go at working around these issues when a SID can't be mapped to a name. In the sidtouser() function if the name isn't mapped I return an "unknown" for that sid. --- /n/D/inferno-os/emu/Nt/devfs.c Wed Nov 21 22:53:06 EST 2007 +++ /sys/emu/Nt/devfs.c Fri Nov 23 11:51:39 EST 2007 @@ -1867,8 +1867,10 @@ gsid = osid; owner = sidtouser(srv, osid); + if(owner == 0) + return 0; group = sidtouser(srv, gsid); - if(owner == 0 || group == 0) + if(group == 0) return 0; /* no acl means full access */ @@ -2063,9 +2065,8 @@ naname = sizeof(aname); ndname = sizeof(dname); - if(!LookupAccountSidW(srv, s, aname, &naname, dname, &ndname, &type)) - return nil; + return mkuser(s, SidTypeUnknown, L"unknown", L"unknown") ; return mkuser(s, type, aname, dname); } On Nov 7, 2007 4:20 AM, Charles Forsyth wrote: > >What does it mean when acme-SAC says: > > >can't fstat /n/c/dev/Users/plalonde/readme: The trust relationship > >between this workstation and the primary domain failed? > > it sounds as though it's heading for therapy. > it's just repeating a diagnostic from Windows. > i've seen peculiar effects when a workstation was disconnected > from the machine declared to be the domain controller and seemed to work until the > cached security records timed out. >