Group :: System/Libraries
RPM: courier-authlib
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: courier-authlib-0.55-alt-dat2db.patch
Download
Download
diff -ruN courier-authlib-0.55.orig/authuserdb.c courier-authlib-0.55/authuserdb.c
--- courier-authlib-0.55.orig/authuserdb.c 2005-02-20 14:41:20 +1000
+++ courier-authlib-0.55/authuserdb.c 2005-03-08 17:27:52 +1000
@@ -82,14 +82,14 @@
return (-1);
userdb_set_debug(courier_authdebug_login_level);
- userdb_init(USERDB ".dat");
+ userdb_init(USERDB ".db");
if ( (u=userdb(cci.user)) == 0)
{
userdb_close();
return (-1);
}
- if ( (udbs=userdbshadow(USERDB "shadow.dat", cci.user)) == 0)
+ if ( (udbs=userdbshadow(USERDB "shadow.db", cci.user)) == 0)
{
free(u);
userdb_close();
diff -ruN courier-authlib-0.55.orig/authuserdbpwd.c courier-authlib-0.55/authuserdbpwd.c
--- courier-authlib-0.55.orig/authuserdbpwd.c 2005-02-20 14:41:20 +1000
+++ courier-authlib-0.55/authuserdbpwd.c 2005-03-08 17:28:26 +1000
@@ -252,7 +252,7 @@
struct userdbs *udb;
- udbs=userdbshadow(USERDB "shadow.dat", uid);
+ udbs=userdbshadow(USERDB "shadow.db", uid);
if (!udbs)
{
@@ -303,7 +303,7 @@
free(passwords);
free(udbs);
- userdb_init(USERDB ".dat");
+ userdb_init(USERDB ".db");
if ( (u=userdb(uid)) == 0 ||
(udb=userdb_creates(u)) == 0)
{
diff -ruN courier-authlib-0.55.orig/preauthuserdbcommon.c courier-authlib-0.55/preauthuserdbcommon.c
--- courier-authlib-0.55.orig/preauthuserdbcommon.c 2005-02-20 14:41:20 +1000
+++ courier-authlib-0.55/preauthuserdbcommon.c 2005-03-08 17:28:13 +1000
@@ -35,7 +35,7 @@
int rc;
userdb_set_debug(courier_authdebug_login_level);
- userdb_init(USERDB ".dat");
+ userdb_init(USERDB ".db");
/* We rely on DPRINTF doing 'safe' printing */
DPRINTF("userdb: looking up '%s'", userid);
if ( (u=userdb(userid)) == 0)
@@ -63,7 +63,7 @@
if (needpass)
{
- udbs=userdbshadow(USERDB "shadow.dat", userid);
+ udbs=userdbshadow(USERDB "shadow.db", userid);
if (udbs)
{
@@ -123,7 +123,7 @@
{
struct userdbs *u;
- userdb_init(USERDB ".dat");
+ userdb_init(USERDB ".db");
for (u=userdb_enum_first(); u; u=userdb_enum_next())
{
diff -ruN courier-authlib-0.55.orig/README.authdebug.html.in courier-authlib-0.55/README.authdebug.html.in
--- courier-authlib-0.55.orig/README.authdebug.html.in 2004-11-26 01:07:02 +1000
+++ courier-authlib-0.55/README.authdebug.html.in 2005-03-08 17:27:28 +1000
@@ -147,7 +147,7 @@
Apr 14 14:07:15 billdog authdaemond: cram: only supports authtype=cram-*
Apr 14 14:07:15 billdog authdaemond: authcram: REJECT - try next module
Apr 14 14:07:15 billdog authdaemond: authuserdb: trying this module
-Apr 14 14:07:15 billdog authdaemond: userdb: opened /etc/userdb.dat
+Apr 14 14:07:15 billdog authdaemond: userdb: opened /etc/courier-imap/userdb.db
Apr 14 14:07:15 billdog authdaemond: userdb: looking up 'brian'
Apr 14 14:07:15 billdog authdaemond: userdb: entry not found
Apr 14 14:07:15 billdog authdaemond: authuserdb: REJECT - try next module
@@ -165,8 +165,8 @@
<li>It tried 'authcram', but since this was a request with authtype=login
(rather than authtype=cram-md5, say), this module cannot handle it so it
REJECTs</li>
- <li>'authuserdb' has a go. In this case there is an /etc/userdb.dat file
- for it to look in, but the requested username 'brian' does not exist in
+ <li>'authuserdb' has a go. In this case there is an /etc/courier-imap/userdb.db
+ file for it to look in, but the requested username 'brian' does not exist in
there, so it REJECTs</li>
<li>'authpam' has a go. It finds the username and home directory in
/etc/passwd, and then calls the PAM subsystem to authenticate. The
diff -ruN courier-authlib-0.55.orig/README_authlib.html.in courier-authlib-0.55/README_authlib.html.in
--- courier-authlib-0.55.orig/README_authlib.html.in 2004-10-21 11:30:58 +1100
+++ courier-authlib-0.55/README_authlib.html.in 2005-03-08 17:28:50 +1000
@@ -935,11 +935,11 @@
><P
>This command creates the actual database, <TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
> and
<TT
CLASS="FILENAME"
->@userdb@shadow.dat</TT
+>@userdb@shadow.db</TT
> from the plain text file
<TT
CLASS="FILENAME"
@@ -950,11 +950,11 @@
><P
>Courier reads <TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
> and
<TT
CLASS="FILENAME"
->@userdb@shadow.dat</TT
+>@userdb@shadow.db</TT
> only. The plain text source,
<TT
CLASS="FILENAME"
diff -ruN courier-authlib-0.55.orig/userdb/makeuserdb.8.in courier-authlib-0.55/userdb/makeuserdb.8.in
--- courier-authlib-0.55.orig/userdb/makeuserdb.8.in 2004-10-21 11:31:20 +1100
+++ courier-authlib-0.55/userdb/makeuserdb.8.in 2005-03-08 17:32:34 +1000
@@ -22,24 +22,24 @@
.SH "DESCRIPTION"
.PP
-\fBmakeuserdb\fR creates \fI@userdb@.dat\fR from
+\fBmakeuserdb\fR creates \fI@userdb@.db\fR from
the contents of \fI@userdb@\fR\&.
\fI@userdb@\fR\&'s contents are described later in this document.
\fBMaildrop\fR,
\fBCourier\fR, and other applications use
-\fI@userdb@.dat\fR as a
+\fI@userdb@.db\fR as a
substitute/complement for your system password file.
The usual purpose for
-\fI@userdb@.dat\fR is to specify "virtual" accounts - accounts
+\fI@userdb@.db\fR is to specify "virtual" accounts - accounts
that do
not have an associated system login.
Usually (but not necessarily) all virtual accounts share the same
system userid.
-\fI@userdb@.dat\fR may also replace
+\fI@userdb@.db\fR may also replace
your system password file. Because the system password file is a text file,
when there's a large number of accounts it will be significantly faster to
search
-\fI@userdb.dat@\fR, which is a binary database,
+\fI@userdb@.db\fR, which is a binary database,
instead of a flat text file that the system password file usually is.
.PP
The \fBmakeuserdb\fR command can be safely executed during
@@ -76,7 +76,7 @@
Fields may be
specified in any order. Here are all the currently defined fields. Note that
not every field is used by every application that reads
-\fI@userdb@.dat\fR\&.
+\fI@userdb@.db\fR\&.
.sp
.RS
.PP
@@ -129,12 +129,12 @@
\fBmaildirquota\fR(7)
for additional information.
.RE
-.SS "@USERDB@SHADOW.DAT"
+.SS "@USERDB@SHADOW.DB"
.PP
All fields whose name ends with 'pw' will NOT copied to
-\fI@userdb@.dat\fR\&. These fields will be copied to
-\fI@userdb@shadow.dat\fR\&.
-\fBmakeuserdb\fR creates \fI@userdb@shadow.dat\fR
+\fI@userdb@.db\fR\&. These fields will be copied to
+\fI@userdb@shadow.db\fR\&.
+\fBmakeuserdb\fR creates \fI@userdb@shadow.db\fR
without any group and world permissions.
Note that \fBmakeuserdb\fR reports an error
if \fB@userdb@\fR has any group
@@ -160,7 +160,7 @@
.PP
After saving the output of \fBpw2userdb\fR, you must still run
\fBmakeuserdb\fR to create
-\fI@userdb@.dat\fR\&.
+\fI@userdb@.db\fR\&.
.PP
\fBvchkpw2userdb\fR converts a vpopmail-style
directory hierarchy to the \fI@userdb@\fR format.
@@ -204,7 +204,7 @@
.RE
.PP
It is still necessary to run \fBmakeuserdb\fR, of course, to
-create the binary database file \fI@userdb@.dat\fR
+create the binary database file \fI@userdb@.db\fR
.PP
NOTE: You are still required to create the \fB@userdb@\fR entry
which maps
@@ -239,8 +239,8 @@
.nf
\fI@userdb@\fR
-\fI@userdb@.dat\fR
-\fI@userdb@shadow.dat\fR
+\fI@userdb@.db\fR
+\fI@userdb@shadow.db\fR
\fI@tmpdir@/userdb.tmp\fR - temporary file
\fI@tmpdir@/userdbshadow.tmp\fR - temporary file
.fi
diff -ruN courier-authlib-0.55.orig/userdb/makeuserdb.html.in courier-authlib-0.55/userdb/makeuserdb.html.in
--- courier-authlib-0.55.orig/userdb/makeuserdb.html.in 2004-10-21 11:31:22 +1100
+++ courier-authlib-0.55/userdb/makeuserdb.html.in 2005-03-08 17:31:31 +1000
@@ -74,7 +74,7 @@
>makeuserdb</B
> creates <TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
> from
the contents of <TT
CLASS="FILENAME"
@@ -94,13 +94,13 @@
>, and other applications use
<TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
> as a
substitute/complement for your system password file.
The usual purpose for
<TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
> is to specify "virtual" accounts - accounts
that do
not have an associated system login.
@@ -108,14 +108,14 @@
system userid.
<TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
> may also replace
your system password file. Because the system password file is a text file,
when there's a large number of accounts it will be significantly faster to
search
<TT
CLASS="FILENAME"
->@userdb.dat@</TT
+>@userdb@.db</TT
>, which is a binary database,
instead of a flat text file that the system password file usually is.</P
><P
@@ -225,7 +225,7 @@
not every field is used by every application that reads
<TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
>.</P
><A
NAME="AEN63"
@@ -400,24 +400,24 @@
><H3
><TT
CLASS="FILENAME"
->@userdb@shadow.dat</TT
+>@userdb@shadow.db</TT
></H3
><P
>All fields whose name ends with 'pw' will NOT copied to
<TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
>. These fields will be copied to
<TT
CLASS="FILENAME"
->@userdb@shadow.dat</TT
+>@userdb@shadow.db</TT
>.
<B
CLASS="COMMAND"
>makeuserdb</B
> creates <TT
CLASS="FILENAME"
->@userdb@shadow.dat</TT
+>@userdb@shadow.db</TT
>
without any group and world permissions.
Note that <B
@@ -502,7 +502,7 @@
> to create
<TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
>.</P
><P
><B
@@ -624,7 +624,7 @@
>, of course, to
create the binary database file <TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
></P
><P
>NOTE: You are still required to create the <B
@@ -724,11 +724,11 @@
><br>
<TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
><br>
<TT
CLASS="FILENAME"
->@userdb@shadow.dat</TT
+>@userdb@shadow.db</TT
><br>
<TT
CLASS="FILENAME"
diff -ruN courier-authlib-0.55.orig/userdb/makeuserdb.in courier-authlib-0.55/userdb/makeuserdb.in
--- courier-authlib-0.55.orig/userdb/makeuserdb.in 2005-01-20 12:30:27 +1000
+++ courier-authlib-0.55/userdb/makeuserdb.in 2005-03-08 17:29:26 +1000
@@ -18,10 +18,10 @@
$ENV{'PATH'}="@bindir@:/usr/bin:/usr/local/bin:/bin";
$dbfile="@userdb@";
-$datfile="@userdb@.dat";
+$datfile="@userdb@.db";
$lockfile="@userdb@.lock";
-$shadowfile="@userdb@shadow.dat";
+$shadowfile="@userdb@shadow.db";
$tmpdir="@tmpdir@";
diff -ruN courier-authlib-0.55.orig/userdb/userdb.8.in courier-authlib-0.55/userdb/userdb.8.in
--- courier-authlib-0.55.orig/userdb/userdb.8.in 2004-10-21 11:31:20 +1100
+++ courier-authlib-0.55/userdb/userdb.8.in 2005-03-08 17:33:15 +1000
@@ -141,14 +141,14 @@
\fBuserdb\fR produces a list, on standard output, of
all the fields in \fI@userdb@\fR for this
\fIaddr\fR\&.
-.SS "REBUILDING @USERDB@.DAT"
+.SS "REBUILDING @USERDB@.DB"
.PP
The actual virtual account/address database is
-\fI@userdb@.dat\fR\&.
+\fI@userdb@.db\fR\&.
This is a binary database file. \fB@userdb@\fR is the plain text
version. After running \fBuserdb\fR, execute the
\fBmakeuserdb\fR(8) command to rebuild
-\fI@userdb@.dat\fR for the changes to take effect.
+\fI@userdb@.db\fR for the changes to take effect.
.SH "BUGS"
.PP
\fIaddr\fR must be unique.
diff -ruN courier-authlib-0.55.orig/userdb/userdb.c courier-authlib-0.55/userdb/userdb.c
--- courier-authlib-0.55.orig/userdb/userdb.c 2004-04-19 02:54:39 +1100
+++ courier-authlib-0.55/userdb/userdb.c 2005-03-08 17:29:52 +1000
@@ -27,7 +27,7 @@
static int initialized=0;
int userdb_debug_level=0;
-/* Open userdb.dat, if already opened, see if it changed, if so reopen */
+/* Open userdb.db, if already opened, see if it changed, if so reopen */
void userdb_init(const char *n)
{
@@ -86,7 +86,7 @@
userdb_debug_level = lvl;
}
-/* Fetch a record from userdb.dat */
+/* Fetch a record from userdb.db */
char *userdb(const char *u)
{
@@ -297,7 +297,7 @@
return NULL;
}
-/* Extracted a userdb.dat record, convert it to a userdbs structure */
+/* Extracted a userdb.db record, convert it to a userdbs structure */
struct userdbs *userdb_creates(const char *u)
{
diff -ruN courier-authlib-0.55.orig/userdb/userdb.h courier-authlib-0.55/userdb/userdb.h
--- courier-authlib-0.55.orig/userdb/userdb.h 2004-04-19 02:54:39 +1100
+++ courier-authlib-0.55/userdb/userdb.h 2005-03-08 17:29:59 +1000
@@ -15,7 +15,7 @@
#endif
/*
- Functions to access local/config/userdb.dat
+ Functions to access local/config/userdb.db
*/
void userdb_set_debug(int);
diff -ruN courier-authlib-0.55.orig/userdb/userdb.html.in courier-authlib-0.55/userdb/userdb.html.in
--- courier-authlib-0.55.orig/userdb/userdb.html.in 2004-10-21 11:31:22 +1100
+++ courier-authlib-0.55/userdb/userdb.html.in 2005-03-08 17:32:55 +1000
@@ -518,13 +518,13 @@
><H3
>REBUILDING <TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
></H3
><P
>The actual virtual account/address database is
<TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
>.
This is a binary database file. <B
CLASS="COMMAND"
@@ -547,7 +547,7 @@
> command to rebuild
<TT
CLASS="FILENAME"
->@userdb@.dat</TT
+>@userdb@.db</TT
> for the changes to take effect.</P
></DIV
></DIV
diff -ruN courier-authlib-0.55.orig/userdb/userdbpw.8.in courier-authlib-0.55/userdb/userdbpw.8.in
--- courier-authlib-0.55.orig/userdb/userdbpw.8.in 2004-10-21 11:31:21 +1100
+++ courier-authlib-0.55/userdb/userdbpw.8.in 2005-03-08 17:33:43 +1000
@@ -49,11 +49,11 @@
authenticate. Therefore, applications that use challenge/response
authentication will store intermediate HMAC contexts in the "pw" fields in the
userdb database, which will be compiled into the
-\fIuserdbshadow.dat\fR
+\fIuserdbshadow.db\fR
database, which has group and world permissions turned off. The
userdb library also requires that the cleartext userdb source for the
-\fIuserdb.dat\fR and
-\fIuserdbshadow.dat\fR databases is also stored with the
+\fIuserdb.db\fR and
+\fIuserdbshadow.db\fR databases is also stored with the
group and world permissions turned off.
.PP
\fBuserdbpw\fR is usually used together in a pipe with
diff -ruN courier-authlib-0.55.orig/userdb/userdbpw.html.in courier-authlib-0.55/userdb/userdbpw.html.in
--- courier-authlib-0.55.orig/userdb/userdbpw.html.in 2004-10-21 11:31:22 +1100
+++ courier-authlib-0.55/userdb/userdbpw.html.in 2005-03-08 17:33:31 +1000
@@ -130,17 +130,17 @@
userdb database, which will be compiled into the
<TT
CLASS="FILENAME"
->userdbshadow.dat</TT
+>userdbshadow.db</TT
>
database, which has group and world permissions turned off. The
userdb library also requires that the cleartext userdb source for the
<TT
CLASS="FILENAME"
->userdb.dat</TT
+>userdb.db</TT
> and
<TT
CLASS="FILENAME"
->userdbshadow.dat</TT
+>userdbshadow.db</TT
> databases is also stored with the
group and world permissions turned off.</P
><P