From: Eric S. <er...@re...> - 2003-07-14 23:09:32
|
Allright, 1) Added Unix.pm and applied the patch successfully, and now I'm getting: ******************************* [eric@deathstar sandweb]# make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/auth..........ok 2/3dd: opening `t/var/users/foo/passwd': No such file or directory # Failed test 3 in t/auth.t at line 29 t/auth..........FAILED test 3 Failed 1/3 tests, 66.67% okay t/file..........ok t/repository....ok 8/190+1 records in 0+1 records out t/repository....ok 11/190+1 records in 0+1 records out t/repository....ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/auth.t 3 1 33.33% 3 Failed 1/3 test scripts, 66.67% okay. 1/30 subtests failed, 96.67% okay. make: *** [test_dynamic] Error 29 ***************************************** Make install seemed to work ok. 2) The group patch added the block in sandweb.cgi to do the toolbar right before $image_dir is defined. I moved the following line of code on line 1408 in my patched sandweb.cgi up above that new block of code: my $image_dir = $config->{'webserver'}->{'image_dir'}; 3) I can't seem to logon, still... this may be related to the auth system looking in the wrong location for the user_dirs, which I have set to /usr/local/sandweb/share/users (and confirmed in sandweb.cfg), but I'm getting the following logfile when I try to login: LOG: Invalid login attempt, username: null LOG: Invalid login attempt, username: reiuser LOG: reiuser logged on. LOG: reiuser logged on. ERROR: Unable to write to file '/var/www/sandweb/share/users/reiuser/.user.cfg': Permission denied ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LOG: reiuser logged on. LOG: reiuser logged on. LOG: Invalid login attempt, username: eric Anyway, I trield creating user directories there and make sure they were writable by the apache user, but still no go. 4) You're sure awfully helpful. Is there a book on Amazon that I can toss your way? =-) Thanks, Eric On Monday 14 July 2003 15:31, you wrote: > Ok, you asked for it :) > > On Mon, Jul 14, 2003 at 02:00:31PM -0600, Eric Swenson wrote: > > On Monday 14 July 2003 13:36, you wrote: > > > On Mon, Jul 14, 2003 at 12:36:10PM -0600, Eric Swenson wrote: > > > > On Monday 14 July 2003 12:23, you wrote: > > > > Full PAM support is probably overkill for this, then, if you have it > > working against ssh. I'd love to try out the unix auth + group patches > > and see how that works out... any patches hanging around there for a > > read-only default user? > > The attached patch and files do both. > > Please note that this patch totally disables the SandWeb "FlatFile" > password in $data_dir/passwd (where $data_dir is set in sandweb.cfg). > > IMPORTANT - this patch currently just disables parts of the UI, if the > user does HTTP POSTs with the right commands, they can do whatever > they want!! It's totally insecure; it just prevents users from hurting > themselves. > > However, since SandWeb is a client there's no way to do irreperable > damage to the repository, they can just check in a bunch of garbage > and screw with their own sandbox. > > These issues are being addressed on the trunk, currently it's just > a UI plug there too. > > One thing I highly recommend - always use SSH method for repositories, > even if the CVS repo is on the same box as SandWeb. Otherwise, all > user's checkins will appear to be from the Apache user, and also > it's less of a security risk (if someone exploits a bug in Apache > or SandWeb, they can overwrite your repository if you use local repo > method..). > > You'll want to drop Unix.pm into lib/SandWeb/Auth/ and "make install". > > For each user you want to enable, you must do the following (where > "username" is the name of your desired user, variables refer to > sandweb.cfg settings): > > * mkdir $users_dir/username > * chown $www_user $users_dir/username > > For the groups stuff, put the attached "group" file into $data_dir, and > add users to it. These group names are hardcoded for now, this is what > they do : > > all: this is what you see in the current version of sandweb. all > CVS/file ops. > > simple: only the basic CVS ops, all file ops > > read-only: only read-only CVS commands, all file ops > > If the user is NOT in a group, they get no toolbar ( the toolbar is the > piece of HTML in the sandbox_menu that shows file ops and the CVS > pulldown ). > > > > Thanks, > Rob |