Bug 5224 - smbc_setxattr with system.nt_sec_desc.group only works when using SIDs
smbc_setxattr with system.nt_sec_desc.group only works when using SIDs
Status: NEW
Product: Samba 3.6
Classification: Unclassified
Component: libsmbclient
unspecified
Other Other
: P3 enhancement
: ---
Assigned To: Jeremy Allison
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-22 09:49 UTC by Henrik
Modified: 2010-01-25 08:41 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik 2008-01-22 09:49:09 UTC
Using smbc_setxattr to set the owner of a file only works when using numeric data input (SID)

E.g
Setting GROUP with Name

strcpy( pBuffer, "BUILTIN\\Users" );
nReturn = pContext->setxattr( pContext, url.c_str(), "system.nt_sec_desc.group+", pBuffer, strlen(pBuffer), 0 );
cout << "nReturn: " << nReturn << ", errno: " << errno << endl;
----------------------------
nReturn: -1, errno: 22
FAILS with Invalid argument

Setting GROUP with SID
strcpy( pBuffer, "S-1-5-32-545" );
nReturn = pContext->setxattr( pContext, url.c_str(), "system.nt_sec_desc.group", pBuffer, strlen(pBuffer), 0 );
cout << "nReturn: " << nReturn << ", errno: " << errno << endl;
---------------------
nReturn: 0, errno: 0
SUCCESS

Cheers,
Henke
Comment 1 Henrik 2008-01-22 09:54:20 UTC
Sorry for the typo but it should of course be "Using smbc_setxattr to set the GROUP of a file only works when using numeric data input (SID)".

Cheers,
Henke
Comment 2 Derrell Lipman 2009-10-21 07:55:25 UTC
Trying to clear up backlog of bugs. Reassigning to Jeremy.
Comment 3 Karolin Seeger 2010-01-25 08:41:39 UTC
Too late for enhancements for 3.5. Raising version.