From bdabe2ceac3783aeddf59fc4b4b4b4fbee0e8748 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sat, 18 Jul 2009 16:06:25 +1200 Subject: [PATCH] Author: Isnard Bug 2080: wbinfo_group.pl - false positive under certain conditions --- helpers/external_acl/wbinfo_group/wbinfo_group.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helpers/external_acl/wbinfo_group/wbinfo_group.pl b/helpers/external_acl/wbinfo_group/wbinfo_group.pl index d5fd00732b..06e970a759 100755 --- a/helpers/external_acl/wbinfo_group/wbinfo_group.pl +++ b/helpers/external_acl/wbinfo_group/wbinfo_group.pl @@ -50,6 +50,8 @@ sub check { $groupGID = `wbinfo -Y "$groupSID"`; chop $groupGID; &debug( "User: -$user-\nGroup: -$group-\nSID: -$groupSID-\nGID: -$groupGID-"); + return 'ERR' if($groupGID eq ""); # Verify if groupGID variable is empty. + return 'ERR' if(`wbinfo -r \Q$user\E` eq ""); # Verify if "wbinfo -r" command returns no value. return 'OK' if(`wbinfo -r \Q$user\E` =~ /^$groupGID$/m); return 'ERR'; } -- 2.47.2