SMBFS mount's file cannot be made executable
Takashi Yano
takashi.yano@nifty.ne.jp
Fri Nov 15 15:21:22 GMT 2024
On Thu, 14 Nov 2024 01:08:07 +0900
Takashi Yano wrote:
> On Wed, 13 Nov 2024 08:58:21 -0700
> Bill Stewart wrote:
> > On Wed, Nov 13, 2024 at 8:38 AM Takashi Yano via Cygwin wrote:
> >
> > Thanks. However, even after reading the document, I still didn't
> > > understand what strings I should set the members for auth for SMB...
> > >
> > > For example, as for Endpoint, the example for ncacn_np is mentioned,
> > > but not for ncacn_ip_tcp.
> > >
> >
> > Perhaps this might help?
> >
> > https://learn.microsoft.com/en-us/windows/win32/rpc/string-binding
>
> Thanks! I do not read it yet, however, it seems to help much.
I built a test program, whose important part is:
AUTHZ_RESOURCE_MANAGER_HANDLE hManager = NULL;
AUTHZ_CLIENT_CONTEXT_HANDLE hClient = NULL;
AUTHZ_ACCESS_REQUEST AccessRequest = {0};
AUTHZ_ACCESS_REPLY AccessReply = {0};
AUTHZ_RPC_INIT_INFO_CLIENT authzRpcInitInfoClient = {0};
WCHAR ObjectUuid[] = L"9a81c2bd-a525-471d-a4ed-49907c0b23da";
WCHAR ProtSeq[] = L"ncacn_ip_tcp";
WCHAR NetworkAddr[] = L"localhost";
WCHAR Endpoint[] = L"135";
authzRpcInitInfoClient.version = AUTHZ_INIT_INFO_VERSION_V1;
authzRpcInitInfoClient.ObjectUuid = ObjectUuid;
authzRpcInitInfoClient.ProtSeq = ProtSeq;
authzRpcInitInfoClient.NetworkAddr = NetworkAddr;
authzRpcInitInfoClient.Endpoint = Endpoint;
AuthzInitializeRemoteResourceManager (&authzRpcInitInfoClient, &hManager);
char buf[1024];
PTOKEN_USER pTokenUser = (PTOKEN_USER) buf;
DWORD len;
GetTokenInformation(hToken, TokenUser, pTokenUser, 1024, &len);
LUID luid = {0,};
AuthzInitializeContextFromSid(0, pTokenUser->User.Sid, hManager,
NULL, luid, NULL, &hClient);
This test code fails at AuthzInitializeContextFromSid() with
RPC_S_UNKNOWN_IF. If AuthzInitializeRemoteResourceManager()
is replaced with AuthzInitializeResourceManager(), the error
does not occur.
I searched the combination of AuthzInitializeContextFromSid()
and RPC_S_UNKNOWN_IF, however nothing was found.
Any suggestion would be appreciated.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
More information about the Cygwin
mailing list