summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-04-22 09:32:14 +0000
committerGerald Carter <jerry@samba.org>2007-04-22 09:32:14 +0000
commite37e23c4dc9e24ab02d239aa5d68c3cfa638f485 (patch)
tree7b0c79383ae5e1d0fbc17029d9d72117d967b037
parent914975e71d2d9f548ca57672609ec9e89590947f (diff)
downloadsamba-e37e23c4dc9e24ab02d239aa5d68c3cfa638f485.tar.gz
samba-e37e23c4dc9e24ab02d239aa5d68c3cfa638f485.tar.xz
samba-e37e23c4dc9e24ab02d239aa5d68c3cfa638f485.zip
r22444: * Validate a SID before trying to convert it to a uid/gid via the public
winbindd interface * Add nss_info/*so files to the RHEL/Fedora packaging
-rw-r--r--packaging/RHEL/samba.spec.tmpl1
-rw-r--r--source/nsswitch/winbindd_sid.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/packaging/RHEL/samba.spec.tmpl b/packaging/RHEL/samba.spec.tmpl
index 627d40eade2..d71e5b07668 100644
--- a/packaging/RHEL/samba.spec.tmpl
+++ b/packaging/RHEL/samba.spec.tmpl
@@ -372,6 +372,7 @@ fi
%{_bindir}/eventlogadm
%{_libdir}/samba/idmap/*.so
+%{_libdir}/samba/nss_info/*.so
%{_libdir}/samba/vfs/*.so
%{_libdir}/samba/auth/*.so
diff --git a/source/nsswitch/winbindd_sid.c b/source/nsswitch/winbindd_sid.c
index a40d35c5820..648d71f2d5d 100644
--- a/source/nsswitch/winbindd_sid.c
+++ b/source/nsswitch/winbindd_sid.c
@@ -199,7 +199,7 @@ static void sid2uid_lookupsid_recv( void *private_data, BOOL success,
return;
}
- if ( (type!=SID_NAME_USER) || (type!=SID_NAME_COMPUTER) ) {
+ if ( (type!=SID_NAME_USER) && (type!=SID_NAME_COMPUTER) ) {
DEBUG(5,("sid2uid_lookupsid_recv: Sid %s is not a user or a computer.\n",
state->request.data.sid));
request_error(state);
@@ -276,8 +276,8 @@ static void sid2gid_lookupsid_recv( void *private_data, BOOL success,
return;
}
- if ( (type!=SID_NAME_DOM_GRP) ||
- (type!=SID_NAME_ALIAS) ||
+ if ( (type!=SID_NAME_DOM_GRP) &&
+ (type!=SID_NAME_ALIAS) &&
(type!=SID_NAME_WKN_GRP) )
{
DEBUG(5,("sid2gid_lookupsid_recv: Sid %s is not a group.\n",