svn commit: samba r2803 - in
branches/SAMBA_4_0/source/ntvfs/unixuid: .
tridge at samba.org
tridge at samba.org
Sun Oct 3 10:25:07 GMT 2004
Author: tridge
Date: 2004-10-03 10:25:06 +0000 (Sun, 03 Oct 2004)
New Revision: 2803
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/ntvfs/unixuid&rev=2803&nolog=1
Log:
allow unixuid module to work with foreign security principles
Modified:
branches/SAMBA_4_0/source/ntvfs/unixuid/vfs_unixuid.c
Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/unixuid/vfs_unixuid.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/unixuid/vfs_unixuid.c 2004-10-03 10:02:41 UTC (rev 2802)
+++ branches/SAMBA_4_0/source/ntvfs/unixuid/vfs_unixuid.c 2004-10-03 10:25:06 UTC (rev 2803)
@@ -41,6 +41,7 @@
void *ctx;
struct ldb_message **res;
const char *sidstr;
+ uint_t atype;
ctx = talloc(req, 0);
sidstr = dom_sid_string(ctx, sid);
@@ -53,7 +54,8 @@
}
/* make sure its a user, not a group */
- if (samdb_result_uint(res[0], "sAMAccountType", 0) != ATYPE_NORMAL_ACCOUNT) {
+ atype = samdb_result_uint(res[0], "sAMAccountType", 0);
+ if (atype && atype != ATYPE_NORMAL_ACCOUNT) {
DEBUG(0,("sid_to_unixuid: sid %s is not ATYPE_NORMAL_ACCOUNT\n", sidstr));
talloc_free(ctx);
return NT_STATUS_ACCESS_DENIED;
@@ -95,7 +97,7 @@
return NT_STATUS_OK;
}
- DEBUG(0,("No sAMAccountName for sid %s!?\n", sidstr));
+ DEBUG(0,("sid_to_unixuid: no unixID, unixName or sAMAccountName for sid %s\n", sidstr));
talloc_free(ctx);
return NT_STATUS_ACCESS_DENIED;
@@ -115,6 +117,7 @@
void *ctx;
struct ldb_message **res;
const char *sidstr;
+ uint_t atype;
ctx = talloc(req, 0);
sidstr = dom_sid_string(ctx, sid);
@@ -127,7 +130,8 @@
}
/* make sure its not a user */
- if (samdb_result_uint(res[0], "sAMAccountType", 0) == ATYPE_NORMAL_ACCOUNT) {
+ atype = samdb_result_uint(res[0], "sAMAccountType", 0);
+ if (atype && atype == ATYPE_NORMAL_ACCOUNT) {
DEBUG(0,("sid_to_unixgid: sid %s is a ATYPE_NORMAL_ACCOUNT\n", sidstr));
talloc_free(ctx);
return NT_STATUS_ACCESS_DENIED;
@@ -169,7 +173,7 @@
return NT_STATUS_OK;
}
- DEBUG(0,("No sAMAccountName for sid %s!?\n", sidstr));
+ DEBUG(0,("sid_to_unixgid: no unixID, unixName or sAMAccountName for sid %s\n", sidstr));
talloc_free(ctx);
return NT_STATUS_ACCESS_DENIED;
More information about the samba-cvs
mailing list