Security dialogues from Win9x
Jim McDonough
jmcd at us.ibm.com
Mon Aug 13 20:20:31 GMT 2001
I think this patch will take care of users without access being able to
take ownership of a file...
--- rpc_server/srv_srvsvc_nt.c Mon Aug 13 15:31:40 2001
+++ /samba/mine/2.2/source//rpc_server/srv_srvsvc_nt.c Mon Aug 13 15:53:23
2001
@@ -1719,6 +1719,13 @@
goto error_exit;
}
+ if (!become_user(conn, conn->vuid)) {
+ DEBUG(0,("Can't become connected user!\n"));
+ r_u->status = ERRnoaccess;
+ goto error_exit;
+ }
+
+
unistr2_to_ascii(filename, &q_u->uni_file_name, sizeof(filename));
unix_convert(filename, conn, NULL, &bad_path, &st);
@@ -1747,6 +1754,7 @@
}
close_file(fsp, True);
+ unbecome_user();
close_cnum(conn, user.vuid);
return r_u->status;
@@ -1756,6 +1764,8 @@
close_file(fsp, True);
}
+ unbecome_user();
+
if (conn)
close_cnum(conn, user.vuid);
----------------------------
Jim McDonough
IBM Linux Technology Center
6 Minuteman Drive
Scarborough, ME 04074
USA
jmcd at us.ibm.com
Phone: (207) 885-5565
IBM tie-line: 776-9984
More information about the samba-technical
mailing list