Date: Wed, 13 Jun 2001 13:32:58 +0200 Sender: HP-3000 Systems Discussion From: Lars Appel Subject: Re: Swat error with Samba 2.0.7 To: HP3000-L@RAVEN.UTC.EDU >ERROR: Can't open include/header.html Logged in as MANAGER.SYS. > > I'am using Samba 2.0.7/iX.2 downloaded from Sambaix.com. > Can someone help me with this problem ? Doesn't look like your fault. Seems that you have found a bug in the MPE port of SWAT in the 2.0.7/iX.2 version. I suspect that you will get the error message for all users but the one in the INETDCNF line for swat. (The config buttons, however, will most probably work ok, despite of the the header/footer error message). Cause: SWAT seems to perform a chdir(SWATDIR) as part of its initialization and later calls become_user_permanently() after validating the password. This essentially calls the setuid() routine, which has the (MPE specific) side-effect of doing a chdir() to the new user's home directory... SWAT uses relative pathnames to access header and footer html pages and thus stumbles across the unexpected pwd. Workaround: Specify the user from the INETDCNF line (samba.org by default) and it's matching password(s) when accessing the swat web pages. Fix: Source code change for the SWAT file source/web/cgi.c is given below. Are you able/willing to recompile from source on your own machine? Lars. ----- cut here ----- *** cgi.c.orig Tue Apr 11 13:36:36 2000 --- cgi.c Wed Jun 13 06:55:21 2001 *************** *** 388,393 **** --- 388,396 ---- * become the user *permanently*. */ become_user_permanently(pass->pw_uid, pass->pw_gid); + #ifdef mpeix + chdir(SWATDIR); + #endif } /* Save the users name */ ----- cut here ----- * To join/leave the list, search archives, change list settings, * * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *