| From | Sent On | Attachments |
|---|---|---|
| Ben Rosengart | Jul 5, 2002 4:02 pm | |
| Sam Varshavchik | Jul 5, 2002 5:02 pm | |
| Ben Rosengart | Jul 5, 2002 8:51 pm | |
| Sam Varshavchik | Jul 5, 2002 8:59 pm | |
| Ben Rosengart | Jul 16, 2002 8:19 am | |
| Sam Varshavchik | Jul 16, 2002 2:04 pm | |
| Ben Rosengart | Jul 17, 2002 1:17 pm | |
| Gordon Messmer | Jul 17, 2002 1:40 pm | |
| Sam Varshavchik | Jul 17, 2002 2:55 pm | |
| Ben Rosengart | Jul 17, 2002 3:41 pm | |
| Ben Rosengart | Jul 17, 2002 3:53 pm | |
| Sam Varshavchik | Jul 17, 2002 4:11 pm | |
| Ben Rosengart | Jul 18, 2002 6:35 am | |
| Ben Rosengart | Jul 18, 2002 9:32 am | |
| Jesse Keating | Jul 18, 2002 9:48 am | |
| Ben Rosengart | Jul 18, 2002 11:05 am | |
| Jesse Keating | Jul 18, 2002 11:12 am | |
| Sam Varshavchik | Jul 18, 2002 11:30 am | |
| Ben Rosengart | Jul 18, 2002 12:19 pm | |
| Ben Rosengart | Jul 18, 2002 12:36 pm | |
| David Miller | Jul 18, 2002 1:14 pm | |
| Gordon Messmer | Jul 18, 2002 1:32 pm | |
| Juha Saarinen | Jul 18, 2002 1:39 pm | |
| Ben Rosengart | Jul 18, 2002 1:49 pm | |
| Ben Rosengart | Jul 18, 2002 1:52 pm | |
| Ben Rosengart | Jul 18, 2002 1:54 pm | |
| Jesse Keating | Jul 18, 2002 1:58 pm | |
| Sam Varshavchik | Jul 18, 2002 2:03 pm | |
| Bowie Bailey | Jul 18, 2002 2:05 pm | |
| Juha Saarinen | Jul 18, 2002 2:08 pm | |
| Ben Rosengart | Jul 18, 2002 2:29 pm | |
| Ben Rosengart | Jul 18, 2002 2:33 pm | |
| Ben Rosengart | Jul 18, 2002 2:37 pm | |
| Sam Varshavchik | Jul 18, 2002 4:56 pm | |
| Alessandro Vesely | Jul 18, 2002 11:00 pm | |
| Ben Rosengart | Jul 19, 2002 1:27 pm | |
| Todd Lyons | Jul 20, 2002 11:29 am | |
| Ben Rosengart | Jul 22, 2002 7:43 pm |
| Subject: | [courier-users] giving makeuserdb a little flexibility | |
|---|---|---|
| From: | Ben Rosengart (br+c...@panix.com) | |
| Date: | Jul 5, 2002 4:02:40 pm | |
| List: | net.sourceforge.lists.courier-users | |
I don't like it that makeuserdb operates only on /etc/userdb. What if I want to put a userdb in /export/config/courier? So I wrote a patch. With my patch, makeuserdb defaults to its traditional behavior, but takes an optional "-f filename" argument. My patch also changes the temporary directory to the directory in which "filename" resides, again defaulting to /etc.
Mr. Sam, I would greatly appreciate it if you'd consider incorporating this patch into the courier codebase, or, if you like the idea but not the style, write your own equivalent patch.
--- /pkg/courier-imap-1.4.5/sbin/makeuserdb Thu May 30 21:43:50 2002 +++ makeuserdb Fri Jul 5 18:51:23 2002 @@ -10,6 +10,12 @@ # distribution information.
use Fcntl ':flock'; +use Getopt::Std 'getopts'; +use vars '$opt_f'; + +$options = "f:"; + +getopts($options);
$prefix="/pkg/courier-imap-1.4.5"; $exec_prefix="${prefix}"; @@ -17,16 +23,17 @@
$ENV{'PATH'}="${exec_prefix}/bin:/usr/bin:/usr/local/bin:/bin";
-$dbfile="/etc/userdb"; -$datfile="/etc/userdb.dat"; -$lockfile="/etc/userdb.lock"; +$dbfile= $opt_f || "/etc/userdb"; +$datfile= $opt_f ? $opt_f . ".dat" : "/etc/userdb.dat"; +$lockfile= $opt_f ? $opt_f . ".lock" : "/etc/userdb.lock";
-$shadowfile="/etc/userdbshadow.dat"; +$shadowfile= $opt_f ? $opt_f . "shadow.dat" : "/etc/userdbshadow.dat";
-$tmpdir="/etc"; +$tmpdir= $dbfile; +$tmpdir=~ s,[^/]+$,,;
-$tmpdatfile="$tmpdir/userdb.tmp"; -$tmpshadowfile="$tmpdir/userdbshadow.tmp"; +$tmpdatfile= $opt_f ? $opt_f . ".tmp" : "$tmpdir/userdb.tmp"; +$tmpshadowfile= $opt_f ? $opt_f . "shadow.tmp" : "$tmpdir/userdbshadow.tmp"; $makedat="/usr/local/libexec/makedatprog";
$mode=(stat($dbfile))[2];
-- Ben Rosengart (212) 741-4400 x215
Microsoft has argued that open source is bad for business, but you have to ask, "Whose business? Theirs, or yours?" --Tim O'Reilly





