svn commit: samba r11934 - in trunk/source/rpc_server: .
vlendec at samba.org
vlendec at samba.org
Sun Nov 27 19:58:08 GMT 2005
Author: vlendec
Date: 2005-11-27 19:58:07 +0000 (Sun, 27 Nov 2005)
New Revision: 11934
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11934
Log:
Actually do a TODO....
Volker
Modified:
trunk/source/rpc_server/srv_samr_nt.c
Changeset:
Modified: trunk/source/rpc_server/srv_samr_nt.c
===================================================================
--- trunk/source/rpc_server/srv_samr_nt.c 2005-11-27 18:57:20 UTC (rev 11933)
+++ trunk/source/rpc_server/srv_samr_nt.c 2005-11-27 19:58:07 UTC (rev 11934)
@@ -2758,7 +2758,7 @@
/* append the alias' RID to it */
if (!sid_append_rid(&sid, alias_rid))
- return NT_STATUS_NO_SUCH_USER;
+ return NT_STATUS_NO_SUCH_ALIAS;
/*check if access can be granted as requested by client. */
@@ -2775,12 +2775,22 @@
if ( !NT_STATUS_IS_OK(status) )
return status;
- /*
- * we should check if the rid really exist !!!
- * JFM.
- */
+ {
+ /* Check we actually have the requested alias */
+ fstring domain, name;
+ enum SID_NAME_USE type;
+ BOOL result;
- /* associate the user's SID with the new handle. */
+ become_root();
+ result = lookup_sid(&sid, domain, name, &type);
+ unbecome_root();
+
+ if (!result || (type != SID_NAME_ALIAS)) {
+ return NT_STATUS_NO_SUCH_ALIAS;
+ }
+ }
+
+ /* associate the alias SID with the new handle. */
if ((info = get_samr_info_by_sid(&sid)) == NULL)
return NT_STATUS_NO_MEMORY;
More information about the samba-cvs
mailing list