Bug 41112

Summary: SMB auth module broken
Product: [Retired] Red Hat Linux Reporter: rm0
Component: squidAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-05-17 16:05:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description rm0 2001-05-17 16:05:14 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)

Description of problem:
1) SMB auth fails because smb_auth.sh is missing. 
The /usr/lib/squid/smb_auth program expects to 
find it in /usr/lib/squid/ (reading Makefile.in 
for the module it may seems the initial intention of 
the authors is installing it in $(libexecdir) so maybe we 
should call make with libexecdir=%{_libexecdir} switch and
add this to the %files section to ship it in /usr/libexec/

2) The line
  make SAMBAPREFIX=%{prefix}
in the %build section of the specfile when compiling the auth 
module should be
  make SAMBAPREFIX=%{_prefix}
so the smb_auth.sh does not get called by smb_auth with the 
SMBPREFIX env var set verbatim to "%{prefix}" causing it to 
fail with the
  fg: no job control
error message

How reproducible:
Always

Steps to Reproduce:
1. Create a /usr/lib/squid/smb_auth.sh file containing

---
#!/bin/sh
read DOMAINNAME
read PASSTHROUGH
read NMBADDR
read NMBCAST
read AUTHSHARE
read AUTHFILE
read SMBUSER
read SMBPASS

echo "DOMAINNAME:  $DOMAINNAME"
echo "PASSTHROUGH: $PASSTHROUGH"
echo "NMBADDR:     $NMBADDR"
echo "NMBCAST:     $NMBCAST"
echo "AUTHSHARE:   $AUTHSHARE"
echo "AUTHFILE:    $AUTHFILE"
echo "SMBUSER:     $SMBUSER"
echo "SMBPASS:     $SMBPASS"
echo
echo "SAMBAPREFIX: $SAMBAPREFIX"
exit 1
---

2. Call smb_auth manually with documented switches plus -d to enter debug 
mode. Enter any <username> <pass><Enter>


Actual Results:  Last line
SAMBAPREFIX: %{prefix}

Expected Results:  Last line:
SAMBAPREFIX: /usr


Additional info:
Another test to show /usr/lib/squid/smb_auth.sh not being shipped 
is: copying smb_auth.sh from the Squid tarball  to the right location 
after fixing bug 1 and running just step 2

Actual Results:
sh: /usr/lib/squid/smb_auth.sh: No such file or directory
ERR

Expected Results:
Authorization being resolved accodingly to rights assigned to the NT 
domain user (now it always get bounced because the ERR
line).

Comment 1 Bill Nottingham 2001-07-23 05:28:49 UTC
I believe this is fixed in the current packages (such as 2.4.STABLE1-3.)