From: mwolson_admin Date: Fri, 10 Apr 2009 03:22:10 +0000 (-0400) Subject: Merge branch 'upstream' into debian X-Git-Tag: debian/0.63.0-6~1 X-Git-Url: https://git.hcoop.net/hcoop/debian/courier-authlib.git/commitdiff_plain/4e60b389634568bcf4cc5009fa37bba3eb381482?hp=ac40fd9eb9d1980c90dc009d526a23ead1ec0f76 Merge branch 'upstream' into debian --- diff --git a/authpgsqllib.c b/authpgsqllib.c index a01ab5f..4ae0fc4 100644 --- a/authpgsqllib.c +++ b/authpgsqllib.c @@ -35,7 +35,6 @@ struct var_data { const char *name; const char *value; const size_t size; - size_t value_length; } ; /* tom@minnesota.com */ @@ -111,6 +110,32 @@ static PGresult *pgresult=0; static PGconn *pgconn=0; +/* +* session variables can be set once for the whole session +*/ + +static void set_session_options(void) +{ + const char *character_set=read_env("PGSQL_CHARACTER_SET"), *check; + + if (character_set) + { + PQsetClientEncoding(pgconn, character_set); + check = pg_encoding_to_char(PQclientEncoding(pgconn)); + if (strcmp(character_set, check) != 0) + { + err("Cannot set Postgresql character set \"%s\", working with \"%s\"\n", + character_set, check); + } + else + { + DPRINTF("Install of a character set for Postgresql: %s", character_set); + } + } +} + + + /* static FILE *DEBUG=0; */ @@ -203,6 +228,7 @@ const char *server_opt=0; fflush(DEBUG); */ + set_session_options(); return 0; } @@ -218,20 +244,34 @@ void auth_pgsql_cleanup() static struct authpgsqluserinfo ui={0, 0, 0, 0, 0, 0, 0, 0}; -static void append_username(char *p, const char *username, - const char *defdomain) +static char *get_username_escaped(const char *username, + const char *defdomain) { - for (strcpy(p, username); *p; p++) - if (*p == '\'' || *p == '"' || *p == '\\' || - (int)(unsigned char)*p < ' ') - *p=' '; /* No funny business */ - if (strchr(username, '@') == 0 && defdomain && *defdomain) - strcat(strcpy(p, "@"), defdomain); + char *username_escaped; + int *error = NULL; + + if (!defdomain) + defdomain=""; + + username_escaped=malloc(strlen(username)*2+2+strlen(defdomain)); + + if (!username_escaped) + { + perror("malloc"); + return 0; + } + + PQescapeStringConn(pgconn, username_escaped, username, strlen(username), error); + + if (strchr(username, '@') == 0 && *defdomain) + strcat(strcat(username_escaped, "@"), defdomain); + + return username_escaped; } /* tom@minnesota.com */ static struct var_data *get_variable (const char *begin, size_t len, - struct var_data *vdt) + struct var_data *vdt) { struct var_data *vdp; @@ -263,8 +303,6 @@ struct var_data *vdp; { if (!vdp->value) vdp->value = ""; - if (!vdp->value_length) /* length cache */ - vdp->value_length = strlen (vdp->value); return vdp; } @@ -340,6 +378,8 @@ struct var_data *v_ptr; q = source; while ( (p=strstr(q, SV_BEGIN_MARK)) ) { + char *enc; + e = strstr (p, SV_END_MARK); if (!e) { @@ -374,10 +414,22 @@ struct var_data *v_ptr; /* work on variable */ v_ptr = get_variable (v_begin, v_size, vdt); if (!v_ptr) return -1; - - if ( (outfn (v_ptr->value, v_ptr->value_length, result)) == -1 ) + + enc=malloc(strlen(v_ptr->value)*2+1); + + if (!enc) return -1; - + + PQescapeStringConn(pgconn, enc, v_ptr->value, + strlen(v_ptr->value), NULL); + + if ( (outfn (enc, strlen(enc), result)) == -1 ) + { + free(enc); + return -1; + } + free(enc); + q = e + 1; } @@ -392,7 +444,6 @@ struct var_data *v_ptr; /* tom@minnesota.com */ static char *parse_string (const char *source, struct var_data *vdt) { -struct var_data *vdp = NULL; char *output_buf = NULL, *pass_buf = NULL; size_t buf_size = 2; @@ -405,11 +456,6 @@ size_t buf_size = 2; return NULL; } - /* zero var_data length cache - important! */ - for (vdp=vdt; vdp->name; vdp++) - vdp->value_length = 0; - - /* phase 1 - count and validate string */ if ( (parse_core (source, vdt, &ParsePlugin_counter, &buf_size)) != 0) return NULL; @@ -434,108 +480,30 @@ size_t buf_size = 2; return output_buf; } -/* tom@minnesota.com */ -static const char *get_localpart (const char *username) +static char *get_localpart (const char *username) { -size_t lbuf = 0; -const char *l_end, *p; -char *q; -static char localpart_buf[130]; - - if (!username || *username == '\0') return NULL; - - p = strchr(username,'@'); - if (p) - { - if ((p-username) > 128) - return NULL; - l_end = p; - } - else - { - if ((lbuf = strlen(username)) > 128) - return NULL; - l_end = username + lbuf; - } + char *p=strdup(username); + char *q; - p=username; - q=localpart_buf; - - while (*p && p != l_end) - if (*p == '\"' || *p == '\\' || - *p == '\'' || (int)(unsigned char)*p < ' ') - p++; - else - *q++ = *p++; + if (!p) + return 0; - *q = '\0'; - return localpart_buf; -} - -/* tom@minnesota.com */ -static const char *get_domain (const char *username, const char *defdomain) -{ -static char domain_buf[260]; -const char *p; -char *q; - - if (!username || *username == '\0') return NULL; - p = strchr(username,'@'); - - if (!p || *(p+1) == '\0') - { - if (defdomain && *defdomain) - return defdomain; - else - return NULL; - } + q=strchr(p, '@'); - p++; - if ((strlen(p)) > 256) - return NULL; - - q = domain_buf; - while (*p) - if (*p == '\"' || *p == '\\' || - *p == '\'' || (int)(unsigned char)*p < ' ') - p++; - else - *q++ = *p++; + if (q) + *q=0; - *q = '\0'; - return domain_buf; + return p; } -/* tom@minnesota.com */ - -static const char *validate_password (const char *password) +static const char *get_domain (const char *username, const char *defdomain) { -static char pass_buf[2][540]; /* Use two buffers, see parse_chpass_clause */ -static int next_pass=0; -const char *p; -char *q, *endq; - - if (!password || *password == '\0' || (strlen(password)) > 256) - return NULL; - - next_pass= 1-next_pass; + const char *p=strchr(username, '@'); - p = password; - q = pass_buf[next_pass]; - endq = q + sizeof pass_buf[next_pass]; - - while (*p && q < endq) - { - if (*p == '\"' || *p == '\\' || *p == '\'') - *q++ = '\\'; - *q++ = *p++; - } - - if (q >= endq) - return NULL; - - *q = '\0'; - return pass_buf[next_pass]; + if (p) + return p+1; + + return defdomain; } /* tom@minnesota.com */ @@ -543,23 +511,34 @@ static char *parse_select_clause (const char *clause, const char *username, const char *defdomain, const char *service) { -static struct var_data vd[]={ - {"local_part", NULL, sizeof("local_part"), 0}, - {"domain", NULL, sizeof("domain"), 0}, - {"service", NULL, sizeof("service"), 0}, - {NULL, NULL, 0, 0}}; + char *localpart, *ret; + static struct var_data vd[]={ + {"local_part", NULL, sizeof("local_part")}, + {"domain", NULL, sizeof("domain")}, + {"service", NULL, sizeof("service")}, + {NULL, NULL, 0}}; if (clause == NULL || *clause == '\0' || !username || *username == '\0') return NULL; - vd[0].value = get_localpart (username); + localpart=get_localpart(username); + if (!localpart) + return NULL; + + vd[0].value = localpart; vd[1].value = get_domain (username, defdomain); - if (!vd[0].value || !vd[1].value) + + if (!vd[1].value) + { + free(localpart); return NULL; + } vd[2].value = service; - return (parse_string (clause, vd)); + ret=parse_string (clause, vd); + free(localpart); + return ret; } /* tom@minnesota.com */ @@ -567,27 +546,38 @@ static char *parse_chpass_clause (const char *clause, const char *username, const char *defdomain, const char *newpass, const char *newpass_crypt) { -static struct var_data vd[]={ - {"local_part", NULL, sizeof("local_part"), 0}, - {"domain", NULL, sizeof("domain"), 0}, - {"newpass", NULL, sizeof("newpass"), 0}, - {"newpass_crypt", NULL, sizeof("newpass_crypt"), 0}, - {NULL, NULL, 0, 0}}; + char *localpart, *ret; + + static struct var_data vd[]={ + {"local_part", NULL, sizeof("local_part")}, + {"domain", NULL, sizeof("domain")}, + {"newpass", NULL, sizeof("newpass")}, + {"newpass_crypt", NULL, sizeof("newpass_crypt")}, + {NULL, NULL, 0}}; if (clause == NULL || *clause == '\0' || !username || *username == '\0' || !newpass || *newpass == '\0' || !newpass_crypt || *newpass_crypt == '\0') return NULL; - vd[0].value = get_localpart (username); + localpart=get_localpart(username); + if (!localpart) + return NULL; + + vd[0].value = localpart; vd[1].value = get_domain (username, defdomain); - vd[2].value = validate_password (newpass); - vd[3].value = validate_password (newpass_crypt); + vd[2].value = newpass; + vd[3].value = newpass_crypt; - if (!vd[0].value || !vd[1].value || - !vd[2].value || !vd[3].value) return NULL; + if (!vd[1].value || !vd[2].value || !vd[3].value) + { + free(localpart); + return NULL; + } - return (parse_string (clause, vd)); + ret=parse_string (clause, vd); + free(localpart); + return ret; } static void initui() @@ -615,11 +605,20 @@ static void initui() struct authpgsqluserinfo *auth_pgsql_getuserinfo(const char *username, const char *service) { -const char *defdomain, *select_clause; -char *querybuf, *p; + const char *defdomain, *select_clause; + char *querybuf; + size_t query_size; + char dummy_buf[1]; + +#define SELECT_QUERY "SELECT %s, %s, %s, %s, %s, %s, %s, %s, %s, %s FROM %s WHERE %s = '%s' %s%s%s", \ + login_field, crypt_field, clear_field, \ + uid_field, gid_field, home_field, maildir_field, \ + quota_field, \ + name_field, \ + options_field, \ + user_table, login_field, username_escaped, \ + where_pfix, where_clause, where_sfix -static const char query[]= - "SELECT %s, %s, %s, %s, %s, %s, %s, %s, %s, %s FROM %s WHERE %s = '"; if (do_connect()) return (0); @@ -648,6 +647,9 @@ static const char query[]= *options_field, *where_clause; + const char *where_pfix, *where_sfix; + char *username_escaped; + user_table=read_env("PGSQL_USER_TABLE"); if (!user_table) @@ -697,43 +699,32 @@ static const char query[]= where_clause=read_env("PGSQL_WHERE_CLAUSE"); if (!where_clause) where_clause = ""; - querybuf=malloc(sizeof(query) + 100 - + 2 * strlen(login_field) - + strlen(crypt_field) - + strlen(clear_field) - + strlen(uid_field) + strlen(gid_field) - + strlen(home_field) - + strlen(maildir_field) - + strlen(quota_field) - + strlen(name_field) - + strlen(options_field) - + strlen(user_table) - + strlen(username) - + strlen(defdomain) - + strlen(where_clause)); + where_pfix=where_sfix=""; - if (!querybuf) + if (strcmp(where_clause, "")) { - perror("malloc"); - return (0); + where_pfix=" AND ("; + where_sfix=")"; } - sprintf(querybuf, query, login_field, crypt_field, clear_field, - uid_field, gid_field, home_field, maildir_field, - quota_field, - name_field, - options_field, - user_table, login_field); - p=querybuf+strlen(querybuf); + username_escaped=get_username_escaped(username, defdomain); - append_username(p, username, defdomain); - strcat(p, "'"); - - if (strcmp(where_clause, "")) { - strcat(p, " AND ("); - strcat(p, where_clause); - strcat(p, ")"); + if (!username_escaped) + return 0; + + query_size=snprintf(dummy_buf, 1, SELECT_QUERY); + + querybuf=malloc(query_size+1); + + if (!querybuf) + { + free(username_escaped); + perror("malloc"); + return 0; } + + snprintf(querybuf, query_size+1, SELECT_QUERY); + free(username_escaped); } else { @@ -849,12 +840,17 @@ int auth_pgsql_setpass(const char *user, const char *pass, const char *oldpass) { char *newpass_crypt; - const char *p; - int l; char *sql_buf; - const char *comma; + size_t sql_buf_size; + char dummy_buf[1]; int rc=0; + char *clear_escaped; + char *crypt_escaped; + int *error = NULL; + + char *username_escaped; + const char *clear_field=NULL; const char *crypt_field=NULL; const char *defdomain=NULL; @@ -870,17 +866,30 @@ int auth_pgsql_setpass(const char *user, const char *pass, if (!(newpass_crypt=authcryptpasswd(pass, oldpass))) return (-1); - for (l=0, p=pass; *p; p++) - { - if ((int)(unsigned char)*p < ' ') - { - free(newpass_crypt); - return (-1); - } - if (*p == '"' || *p == '\\') - ++l; - ++l; - } + clear_escaped=malloc(strlen(pass)*2+1); + + if (!clear_escaped) + { + perror("malloc"); + free(newpass_crypt); + return -1; + } + + crypt_escaped=malloc(strlen(newpass_crypt)*2+1); + + if (!crypt_escaped) + { + perror("malloc"); + free(clear_escaped); + free(newpass_crypt); + return -1; + } + + PQescapeStringConn(pgconn, clear_escaped, pass, strlen(pass), error); + PQescapeStringConn(pgconn, crypt_escaped, + newpass_crypt, strlen(newpass_crypt), error); + + /* tom@minnesota.com */ chpass_clause=read_env("PGSQL_CHPASS_CLAUSE"); @@ -893,13 +902,50 @@ int auth_pgsql_setpass(const char *user, const char *pass, crypt_field=read_env("PGSQL_CRYPT_PWFIELD"); clear_field=read_env("PGSQL_CLEAR_PWFIELD"); where_clause=read_env("PGSQL_WHERE_CLAUSE"); - sql_buf=malloc(strlen(crypt_field ? crypt_field:"") - + strlen(clear_field ? clear_field:"") - + strlen(defdomain ? defdomain:"") - + strlen(login_field) + l + strlen(newpass_crypt) - + strlen(user_table) - + strlen(where_clause ? where_clause:"") - + 200); + + username_escaped=get_username_escaped(user, defdomain); + + if (!username_escaped) + return -1; + + if (!where_clause) + where_clause=""; + + if (!crypt_field) + crypt_field=""; + + if (!clear_field) + clear_field=""; + +#define DEFAULT_SETPASS_UPDATE \ + "UPDATE %s SET %s%s%s%s %s %s%s%s%s WHERE %s='%s' %s%s%s", \ + user_table, \ + *clear_field ? clear_field:"", \ + *clear_field ? "='":"", \ + *clear_field ? clear_escaped:"", \ + *clear_field ? "'":"", \ + \ + *clear_field && *crypt_field ? ",":"", \ + \ + *crypt_field ? crypt_field:"", \ + *crypt_field ? "='":"", \ + *crypt_field ? crypt_escaped:"", \ + *crypt_field ? "'":"", \ + \ + login_field, username_escaped, \ + *where_clause ? " AND (":"", where_clause, \ + *where_clause ? ")":"" + + + sql_buf_size=snprintf(dummy_buf, 1, DEFAULT_SETPASS_UPDATE); + + sql_buf=malloc(sql_buf_size+1); + + if (sql_buf) + snprintf(sql_buf, sql_buf_size+1, + DEFAULT_SETPASS_UPDATE); + + free(username_escaped); } else { @@ -912,62 +958,10 @@ int auth_pgsql_setpass(const char *user, const char *pass, if (!sql_buf) { + free(clear_escaped); free(newpass_crypt); return (-1); } - - if (!chpass_clause) /* tom@minnesota.com */ - { - sprintf(sql_buf, "UPDATE %s SET", user_table); - - comma=""; - - if (clear_field && *clear_field) - { - char *q; - - strcat(strcat(strcat(sql_buf, " "), clear_field), - "='"); - - q=sql_buf+strlen(sql_buf); - while (*pass) - { - if (*pass == '"' || *pass == '\\') - *q++= '\\'; - *q++ = *pass++; - } - strcpy(q, "'"); - comma=", "; - } - - if (crypt_field && *crypt_field) - { - strcat(strcat(strcat(strcat(strcat(strcat(sql_buf, comma), - " "), - crypt_field), - "='"), - newpass_crypt), - "'"); - } - free(newpass_crypt); - - strcat(strcat(strcat(sql_buf, " WHERE "), - login_field), - "='"); - - append_username(sql_buf+strlen(sql_buf), user, defdomain); - - strcat(sql_buf, "'"); - - if (where_clause && *where_clause) - { - strcat(sql_buf, " AND ("); - strcat(sql_buf, where_clause); - strcat(sql_buf, ")"); - } - - } /* end of: if (!chpass_clause) */ - if (courier_authdebug_login_level >= 2) { DPRINTF("setpass SQL: %s", sql_buf); @@ -980,6 +974,9 @@ int auth_pgsql_setpass(const char *user, const char *pass, auth_pgsql_cleanup(); } PQclear(pgresult); + free(clear_escaped); + free(crypt_escaped); + free(newpass_crypt); free(sql_buf); return (rc); } @@ -994,11 +991,9 @@ void auth_pgsql_enumerate( void(*cb_func)(const char *name, void *void_arg) { const char *select_clause, *defdomain; - char *querybuf, *p; + char *querybuf; -static const char query[]= - "SELECT %s, %s, %s, %s, %s, %s FROM %s WHERE 1=1"; -int i,n; + int i,n; if (do_connect()) return; @@ -1019,6 +1014,8 @@ int i,n; *maildir_field, *options_field, *where_clause; + char dummy_buf[1]; + size_t query_len; user_table=read_env("PGSQL_USER_TABLE"); @@ -1050,14 +1047,18 @@ int i,n; where_clause=read_env("PGSQL_WHERE_CLAUSE"); if (!where_clause) where_clause = ""; - querybuf=malloc(sizeof(query) + 100 - + strlen(login_field) - + strlen(uid_field) + strlen(gid_field) - + strlen(home_field) - + strlen(maildir_field) - + strlen(options_field) - + strlen(user_table) - + strlen(where_clause)); +#define DEFAULT_ENUMERATE_QUERY \ + "SELECT %s, %s, %s, %s, %s, %s FROM %s %s%s",\ + login_field, uid_field, gid_field, \ + home_field, maildir_field, \ + options_field, user_table, \ + *where_clause ? " WHERE ":"", \ + where_clause + + + query_len=snprintf(dummy_buf, 1, DEFAULT_ENUMERATE_QUERY); + + querybuf=malloc(query_len+1); if (!querybuf) { @@ -1065,16 +1066,7 @@ int i,n; return; } - sprintf(querybuf, query, login_field, - uid_field, gid_field, home_field, maildir_field, - options_field, user_table); - p=querybuf+strlen(querybuf); - - if (strcmp(where_clause, "")) { - strcat(p, " AND ("); - strcat(p, where_clause); - strcat(p, ")"); - } + snprintf(querybuf, query_len+1, DEFAULT_ENUMERATE_QUERY); } else { diff --git a/authpgsqlrc b/authpgsqlrc index ad1f519..99242a2 100644 --- a/authpgsqlrc +++ b/authpgsqlrc @@ -1,6 +1,6 @@ -##VERSION: $Id: authpgsqlrc,v 1.12 2004/11/25 15:08:27 mrsam Exp $ +##VERSION: $Id: $ # -# Copyright 2000-2004 Double Precision, Inc. See COPYING for +# Copyright 2000-2008 Double Precision, Inc. See COPYING for # distribution information. # # Do not alter lines that begin with ##, they are used when upgrading @@ -46,6 +46,13 @@ PGSQL_PASSWORD admin PGSQL_DATABASE template1 +##NAME: PGSQL_CHARACTER_SET:0 +# +# Optionally install a character set mapping. Restart authdaemond, send a test +# query using authtest and check for error messages in syslog/maillog. +# +# PGSQL_CHARACTER_SET UTF8 + ##NAME: PGSQL_USER_TABLE:0 # # The name of the table containing your user data. See README.authmysqlrc diff --git a/config.guess b/config.guess index 951383e..ad5281e 100755 --- a/config.guess +++ b/config.guess @@ -1,10 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2007-05-17' +timestamp='2005-08-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -107,7 +106,7 @@ set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -161,7 +160,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -208,11 +206,8 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -330,7 +325,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*) + i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) @@ -769,19 +764,12 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - *:MINGW*:*) + i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) @@ -791,15 +779,9 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -835,9 +817,6 @@ EOF arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; @@ -872,11 +851,7 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) @@ -895,11 +870,7 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) @@ -948,15 +919,9 @@ EOF sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; - xtensa:Linux:*:*) - echo xtensa-unknown-linux-gnu - exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -999,7 +964,7 @@ EOF LIBC=gnulibc1 # endif #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout @@ -1009,11 +974,7 @@ EOF LIBC=dietlibc #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit @@ -1215,15 +1176,6 @@ EOF SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1233,6 +1185,7 @@ EOF *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1311,9 +1264,6 @@ EOF i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff --git a/config.sub b/config.sub index c060f44..1c366df 100755 --- a/config.sub +++ b/config.sub @@ -1,10 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2007-04-29' +timestamp='2005-07-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -120,9 +119,8 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -173,10 +171,6 @@ case $os in -hiux*) os=-hiuxwe2 ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -193,10 +187,6 @@ case $os in # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -241,16 +231,15 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ + | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -268,27 +257,28 @@ case $basic_machine in | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ - | mt \ + | ms1 \ | msp430 \ - | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; + m32c) + basic_machine=$basic_machine-unknown + ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -296,9 +286,6 @@ case $basic_machine in ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; - ms1) - basic_machine=mt-unknown - ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -318,18 +305,18 @@ case $basic_machine in | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ + | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ + | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -349,30 +336,31 @@ case $basic_machine in | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ - | mt-* \ + | ms1-* \ | msp430-* \ - | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; + m32c-*) + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -683,10 +671,6 @@ case $basic_machine in basic_machine=i386-pc os=-mingw32 ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) basic_machine=m68000-convergent ;; @@ -712,9 +696,6 @@ case $basic_machine in basic_machine=i386-pc os=-msdos ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; mvs) basic_machine=i370-ibm os=-mvs @@ -822,12 +803,6 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -884,10 +859,6 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -914,10 +885,6 @@ case $basic_machine in sb1el) basic_machine=mipsisa64sb1el-unknown ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; sei) basic_machine=mips-sei os=-seiux @@ -929,9 +896,6 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; - sh5el) - basic_machine=sh5le-unknown - ;; sh64) basic_machine=sh64-unknown ;; @@ -1137,7 +1101,7 @@ case $basic_machine in sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -1210,23 +1174,21 @@ case $os in | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1378,12 +1340,6 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; *-acorn) os=-riscix1.2 ;; @@ -1393,9 +1349,9 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1421,9 +1377,6 @@ case $basic_machine in m68*-cisco) os=-aout ;; - mep-*) - os=-elf - ;; mips*-cisco) os=-elf ;; diff --git a/debian/authenumerate.pod b/debian/authenumerate.pod new file mode 100644 index 0000000..1fdb539 --- /dev/null +++ b/debian/authenumerate.pod @@ -0,0 +1,24 @@ +=head1 NAME + +authenumerate - Fetches all known users from the authentication modules + +=head1 SYNOPSIS + +authenumerate [ -m MODULE ] + +=head1 DESCRIPTION + +B lists all known users from the authentication modules, +including uid, gid and home directory. Its use is documented in +F. +It may also be useful to test the authentication modules. + +=head1 SEE ALSO + +L(8) + +=head1 AUTHOR + +This manual page was written by Willi Mann +for the Debian GNU/Linux system. + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..88916bc --- /dev/null +++ b/debian/changelog @@ -0,0 +1,199 @@ +courier-authlib (0.61.0-1+lenny1) testing-security; urgency=high + + * Non-maintainer upload by the security team + * Fix several sql-injection vulnerabilities in authpgsqllib.c by using + PQsetClientEncoding() and PQescapeStringConn() + Fixes: CVE-2008-2380 + + -- Steffen Joeris Mon, 08 Dec 2008 13:48:12 +0000 + +courier-authlib (0.61.0-1) unstable; urgency=low + + * new upstream release + * lintian: + - debian/compat file + - don't ignore make clean errors + + -- Stefan Hornburg (Racke) Thu, 17 Jul 2008 12:59:36 +0200 + +courier-authlib (0.60.1-2.1) unstable; urgency=high + + * Non-maintainer upload by the security team + * Fix sql injection vulnerability by changing to use + mysql_set_character_set instead of SET NAMES + (Change was introduced by upstream in 0.60.6) + (Closes: #485424) + + -- Steffen Joeris Mon, 09 Jun 2008 15:29:23 +0000 + +courier-authlib (0.60.1-2) unstable; urgency=low + + * added LSB dependency info to init scripts (Closes: #460221, thanks to + Petter Reinholdtsen for the patch) + + -- Stefan Hornburg (Racke) Mon, 7 Apr 2008 13:21:37 +0200 + +courier-authlib (0.60.1-1) unstable; urgency=low + + * new upstream release + + -- Stefan Hornburg (Racke) Mon, 15 Oct 2007 10:56:16 +0200 + +courier-authlib (0.60.0-1) unstable; urgency=low + + * new upstream release, now under GPL version 3 + + -- Stefan Hornburg (Racke) Sun, 30 Sep 2007 21:58:35 +0200 + +courier-authlib (0.59.3-2) unstable; urgency=low + + * dropped alternative build dependency on postgresql-dev + (Closes: #429964, thanks to Lior Kaplan for the report + + -- Stefan Hornburg (Racke) Thu, 21 Jun 2007 20:26:38 +0200 + +courier-authlib (0.59.3-1) unstable; urgency=low + + * new upstream release + + -- Stefan Hornburg (Racke) Mon, 23 Apr 2007 10:18:17 +0200 + +courier-authlib (0.59.1-0.1) experimental; urgency=low + + * new upstream release + + -- Stefan Hornburg (Racke) Wed, 17 Jan 2007 11:58:29 +0100 + +courier-authlib (0.58-5) unstable; urgency=low + + * added dependency and build dependency on expect (Closes: #400812, + thanks to Peter Troeger for the report) + + -- Stefan Hornburg (Racke) Wed, 29 Nov 2006 11:42:45 +0100 + +courier-authlib (0.58-4) unstable; urgency=medium + + * call dh_makeshlibs during binary-arch target in order to get proper shlib + information for libcourierauth.so (Closes: #378249, thanks to Charles + Fry for the report and Steinar H. Gunderson + for the patch) + * ensure that courier-authdaemon is upgraded when switching to courier-authlib + * switch to lsb logging functions (Closes: #384823, thanks to David Härdeman + for the patch) + + -- Stefan Hornburg (Racke) Sat, 9 Sep 2006 17:37:11 +0200 + +courier-authlib (0.58-3.1) unstable; urgency=medium + + * Non-Maintainer Upload to fix security bug, caused by + /var/run/courier/authdaemon being world executable. Thanks to Martin + Ferrari for the fix. (Closes: #378571) + + -- Margarita Manterola Tue, 1 Aug 2006 16:45:07 -0300 + +courier-authlib (0.58-3) unstable; urgency=low + + * remove all Courier runtime files on purge of courier-authdaemon + + -- Stefan Hornburg (Racke) Tue, 6 Jun 2006 04:48:20 +0200 + +courier-authlib (0.58-2) unstable; urgency=low + + * set ownership of /var/run/courier and /var/run/courier/authdaemon to + daemon.daemon (Closes: #368358, #368360) + + -- Stefan Hornburg (Racke) Tue, 23 May 2006 09:43:15 +0200 + +courier-authlib (0.58-1.0) unstable; urgency=low + + * first upload to unstable + + -- Stefan Hornburg (Racke) Fri, 12 May 2006 16:53:38 +0200 + +courier-authlib (0.58-0.4) experimental; urgency=low + + * changed alternative dependency for libmysqlclient-dev to + libmysqlclient15-dev (Closes: #356728, thanks to Stefan Huehner + for the report) + + -- Stefan Hornburg (Racke) Tue, 14 Mar 2006 11:14:11 +0100 + +courier-authlib (0.58-0.3) experimental; urgency=low + + * courier-authlib-userdb conflicts with pre-authlib courier-base package + + -- Stefan Hornburg (Racke) Wed, 11 Jan 2006 09:33:10 +0100 + +courier-authlib (0.58-0.2) experimental; urgency=low + + * updated config.{guess,sub} to avoid FTBFS on some architectures + (Closes: #346105, thanks to Petr Salinger + ) + + -- Stefan Hornburg (Racke) Fri, 6 Jan 2006 11:13:19 +0100 + +courier-authlib (0.58-0.1) experimental; urgency=low + + * new upstream release + * transition to new PostgreSQL architecture (Closes: #339297, thanks to + Martin Pitt for the report and the patch) + * added courier-authlib-mysql/postgresql prerm/postinst scripts to + restart courier-authdaemon + + -- Stefan Hornburg (Racke) Thu, 5 Jan 2006 14:58:19 +0100 + +courier-authlib (0.57.20051004-2) experimental; urgency=low + + * ship configuration files with sane ownership/permissions + * restoring call to pam_acct_mgmt + + -- Stefan Hornburg (Racke) Fri, 11 Nov 2005 00:49:19 +0100 + +courier-authlib (0.57.20051004-1) experimental; urgency=low + + * new upstream release: + - contains authtest manual page and authpasswd script + * keep authtest name instead of renaming to courierauthtest, there are + currently no conflicts with other binaries + * separate package courier-authlib-pipe for authpipe module + * revive courier-authdaemon package to allow seamless upgrades from sarge + * changed FSF address in copyright file + * changed BuildDepends from libmysqlclient10-dev to libmysqlclient14-dev + * use DH_COMPAT=4 + + -- Stefan Hornburg (Racke) Tue, 25 Oct 2005 11:04:45 +0200 + +courier-authlib (0.56-0.5) experimental; urgency=low + + * added build dependency on procps (Closes: #311976, thanks to Kurt + Roeckx for the report) + + -- Stefan Hornburg (Racke) Sat, 4 Jun 2005 22:03:43 +0200 + +courier-authlib (0.56-0.4) experimental; urgency=low + + * provide proper LDAP configuration file instead of an empty one (thanks + to Peter Mann for the report) + + -- Stefan Hornburg (Racke) Tue, 31 May 2005 14:48:04 +0200 + +courier-authlib (0.56-0.3) experimental; urgency=low + + * added dependency to courier-authlib-dev on courier-authlib + * versioned dependencies for courier-authlib-* packages + + -- Stefan Hornburg (Racke) Tue, 31 May 2005 11:13:01 +0200 + +courier-authlib (0.56-0.2) experimental; urgency=low + + * removed check for openssl binary (Closes: #311175, thanks to Kenshi + Muto for the report) + + -- Stefan Hornburg (Racke) Mon, 30 May 2005 13:23:02 +0200 + +courier-authlib (0.56-0.1) experimental; urgency=low + + * initial release + + -- Stefan Hornburg (Racke) Fri, 27 May 2005 23:20:21 +0200 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..d7a1d2e --- /dev/null +++ b/debian/control @@ -0,0 +1,69 @@ +Source: courier-authlib +Section: mail +Priority: optional +Maintainer: Stefan Hornburg (Racke) +Standards-Version: 3.6.1.1 +Build-Depends: libmysqlclient-dev | libmysqlclient15-dev, libpam0g-dev, libgdbm-dev | libgdbmg1-dev, debhelper (>= 4.1.16), libldap-dev, libsasl2-dev | libsasl-dev, libpq-dev, libtool, libltdl3-dev, procps, expect + +Package: courier-authlib +Architecture: any +Depends: ${shlibs:Depends}, expect +Conflicts: courier-base (<< 0.48), courier-authdaemon (<< 0.58), courier-authmysql, courier-authpostgresql +Description: Courier authentication library + The Courier authentication library provides authentication services for + other Courier applications. + +Package: courier-authdaemon +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}), lsb-base (>= 3.0-10) +Description: Courier authentication daemon + This package contains the authentication daemon for the Courier applications. + +Package: courier-authlib-dev +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}) +Conflicts: courier-base (<< 0.48) +Description: Development libraries for the Courier authentication library + This package contains the development libraries and files needed to compile + Courier packages that use the Courier authentication library. + +Package: courier-authlib-userdb +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}) +Conflicts: courier-base (<< 0.48) +Description: userdb support for the Courier authentication library + This package contains the userdb support for the Courier authentication + library. Userdb is a simple way to manage virtual mail accounts using + a GDBM-based database file. + +Package: courier-authlib-mysql +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}) +Conflicts: courier-authmysql +Replaces: courier-authmysql +Description: MySQL support for the Courier authentication library + This package contains the MySQL support for the Courier authentication library. + +Package: courier-authlib-postgresql +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}) +Conflicts: courier-authpostgresql +Replaces: courier-authpostgresql +Description: PostgreSQL support for the Courier authentication library + This package contains the PostgreSQL support for the Courier authentication + library. + +Package: courier-authlib-ldap +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}) +Description: LDAP support for the Courier authentication library + This package contains the LDAP support for the Courier authentication library. + +Package: courier-authlib-pipe +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}) +Description: External authentication support for the Courier authentication library + This package contains external authentication support via pipes for the + Courier authentication library. The authpipe module is a generic plugin + that enables authentication requests to be serviced by an external + program, then communicates through messages on stdin and stdout. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..a32c3fe --- /dev/null +++ b/debian/copyright @@ -0,0 +1,26 @@ +This package was debianized by Stefan Hornburg (Racke) on +Fri Oct 29 10:59:13 2004 CEST. + +It was downloaded from: +ftp://courier.sourceforge.net/pub/courier/courier/ + +Upstream Author: + +Sam Varshavchik +Double Precision, Inc. +PO Box 668 +Greenwood Lake, NY 10925 + +Copyright: + +This software is released under the GPL, version 3. +Additionally, compiling, linking, and/or using the OpenSSL toolkit in +conjunction with this software is allowed. + +A copy of the GNU General Public License is available as +/usr/share/common-licenses/GPL-3 in the Debian GNU/Linux distribution or on the +World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can also +obtain it by writing to the Free Software Foundation, Inc., 51 Franklin St, +Fifth Floor, Boston, MA 02110-1301, USA. + + diff --git a/debian/courier-authdaemon.dirs b/debian/courier-authdaemon.dirs new file mode 100644 index 0000000..5273027 --- /dev/null +++ b/debian/courier-authdaemon.dirs @@ -0,0 +1 @@ +/var/run/courier/authdaemon diff --git a/debian/courier-authdaemon.files b/debian/courier-authdaemon.files new file mode 100644 index 0000000..d7ec46c --- /dev/null +++ b/debian/courier-authdaemon.files @@ -0,0 +1,3 @@ +/etc/courier/authdaemonrc +/usr/sbin/authdaemond +/var/run/courier/authdaemon diff --git a/debian/courier-authdaemon.init b/debian/courier-authdaemon.init new file mode 100644 index 0000000..b3da04e --- /dev/null +++ b/debian/courier-authdaemon.init @@ -0,0 +1,48 @@ +#! /bin/sh -e +# +### BEGIN INIT INFO +# Provides: courier-authdaemon +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO + +prefix="/usr" +exec_prefix=${prefix} +sysconfdir="/etc/courier" +sbindir="${exec_prefix}/sbin" +daemonscript="${sbindir}/authdaemond" + +. /lib/lsb/init-functions + +# Check for a leftover init script +if [ ! -x $daemonscript ]; then + exit 0 +fi + +case "$1" in +start) + # Start daemon. + cd / + log_daemon_msg "Starting Courier authentication services" "authdaemond" + $daemonscript start + log_end_msg 0 + ;; +stop) + # Stop daemon. + cd / + log_daemon_msg "Stopping Courier authentication services" "authdaemond" + $daemonscript stop + log_end_msg 0 + ;; +restart|reload|force-reload) + $0 stop + $0 start + ;; +*) + echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2 + exit 2 + ;; +esac +exit 0 diff --git a/debian/courier-authdaemon.postrm b/debian/courier-authdaemon.postrm new file mode 100644 index 0000000..3507f4e --- /dev/null +++ b/debian/courier-authdaemon.postrm @@ -0,0 +1,25 @@ +#! /bin/sh -e +# +# Copyright 2000,2001,2006 by Stefan Hornburg (Racke) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + +if [ "$1" = "purge" ]; then + # remove runtime files + rm -rf /var/run/courier +fi + +#DEBHELPER# diff --git a/debian/courier-authlib-dev.files b/debian/courier-authlib-dev.files new file mode 100644 index 0000000..93fecca --- /dev/null +++ b/debian/courier-authlib-dev.files @@ -0,0 +1,6 @@ +/usr/bin/courierauthconfig +/usr/include +/usr/lib/courier-authlib/*.a +/usr/lib/courier-authlib/*.la +/usr/share/man/man3 + diff --git a/debian/courier-authlib-ldap.docs b/debian/courier-authlib-ldap.docs new file mode 100644 index 0000000..55d4e59 --- /dev/null +++ b/debian/courier-authlib-ldap.docs @@ -0,0 +1,2 @@ +README.ldap +authldap.schema \ No newline at end of file diff --git a/debian/courier-authlib-ldap.files b/debian/courier-authlib-ldap.files new file mode 100644 index 0000000..16b7437 --- /dev/null +++ b/debian/courier-authlib-ldap.files @@ -0,0 +1,2 @@ +/etc/courier/authldaprc +/usr/lib/courier-authlib/libauthldap.so* \ No newline at end of file diff --git a/debian/courier-authlib-mysql.docs b/debian/courier-authlib-mysql.docs new file mode 100644 index 0000000..82eb811 --- /dev/null +++ b/debian/courier-authlib-mysql.docs @@ -0,0 +1 @@ +README.authmysql.html diff --git a/debian/courier-authlib-mysql.files b/debian/courier-authlib-mysql.files new file mode 100644 index 0000000..fd92f24 --- /dev/null +++ b/debian/courier-authlib-mysql.files @@ -0,0 +1,2 @@ +/etc/courier/authmysqlrc +/usr/lib/courier-authlib/libauthmysql.so* \ No newline at end of file diff --git a/debian/courier-authlib-mysql.postinst b/debian/courier-authlib-mysql.postinst new file mode 100644 index 0000000..207d93b --- /dev/null +++ b/debian/courier-authlib-mysql.postinst @@ -0,0 +1,30 @@ +#! /bin/sh -e +# +# Copyright 2000,2001,2005 by Stefan Hornburg (Racke) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + + +if [ "$1" = "configure" ]; then + if [ -z "$2" ]; then + # initial install of authmysql, we need to restart authdaemon + if [ -x /usr/sbin/authdaemond ]; then + /usr/sbin/authdaemond restart + fi + fi +fi + +#DEBHELPER# diff --git a/debian/courier-authlib-mysql.prerm b/debian/courier-authlib-mysql.prerm new file mode 100644 index 0000000..10a9ef2 --- /dev/null +++ b/debian/courier-authlib-mysql.prerm @@ -0,0 +1,25 @@ +#! /bin/sh -e +# +# Copyright 2000,2005 by Stefan Hornburg +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + +# we need to restart authdaemon +if [ -x /usr/sbin/authdaemond ]; then + /usr/sbin/authdaemond restart +fi + +#DEBHELPER# diff --git a/debian/courier-authlib-pipe.files b/debian/courier-authlib-pipe.files new file mode 100644 index 0000000..4073d95 --- /dev/null +++ b/debian/courier-authlib-pipe.files @@ -0,0 +1,2 @@ +/usr/lib/courier-authlib/libauthpipe*.so* + diff --git a/debian/courier-authlib-postgresql.docs b/debian/courier-authlib-postgresql.docs new file mode 100644 index 0000000..0c4a644 --- /dev/null +++ b/debian/courier-authlib-postgresql.docs @@ -0,0 +1,2 @@ +README.authmysql.html +README.authpostgres.html \ No newline at end of file diff --git a/debian/courier-authlib-postgresql.files b/debian/courier-authlib-postgresql.files new file mode 100644 index 0000000..5387e8d --- /dev/null +++ b/debian/courier-authlib-postgresql.files @@ -0,0 +1,2 @@ +/etc/courier/authpgsqlrc +/usr/lib/courier-authlib/libauthpgsql.so* diff --git a/debian/courier-authlib-postgresql.postinst b/debian/courier-authlib-postgresql.postinst new file mode 100644 index 0000000..5de5e6c --- /dev/null +++ b/debian/courier-authlib-postgresql.postinst @@ -0,0 +1,30 @@ +#! /bin/sh -e +# +# Copyright 2001,2005 by Stefan Hornburg (Racke) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + + +if [ "$1" = "configure" ]; then + if [ -z "$2" ]; then + # initial install of authpostgresql, we need to restart authdaemon + if [ -x /usr/sbin/authdaemond ]; then + /usr/sbin/authdaemond restart + fi + fi +fi + +#DEBHELPER# diff --git a/debian/courier-authlib-postgresql.prerm b/debian/courier-authlib-postgresql.prerm new file mode 100644 index 0000000..31c83ba --- /dev/null +++ b/debian/courier-authlib-postgresql.prerm @@ -0,0 +1,25 @@ +#! /bin/sh -e +# +# Copyright 2001,2005 by Stefan Hornburg +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + +# we need to restart authdaemon +if [ -x /usr/sbin/authdaemond ]; then + /usr/sbin/authdaemond restart +fi + +#DEBHELPER# diff --git a/debian/courier-authlib-userdb.files b/debian/courier-authlib-userdb.files new file mode 100644 index 0000000..d74c5fd --- /dev/null +++ b/debian/courier-authlib-userdb.files @@ -0,0 +1,14 @@ +/usr/lib/courier-authlib/libauthuserdb.so* +/usr/sbin/makeuserdb +/usr/sbin/pw2userdb +/usr/sbin/userdb +/usr/sbin/userdbpw +/usr/sbin/userdb-test-cram-md5 +/usr/share/man/man8/makeuserdb.8 +/usr/share/man/man8/pw2userdb.8.gz +/usr/share/man/man8/userdb.8 +/usr/share/man/man8/userdbpw.8 + + + + diff --git a/debian/courier-authlib.docs b/debian/courier-authlib.docs new file mode 100644 index 0000000..49169f7 --- /dev/null +++ b/debian/courier-authlib.docs @@ -0,0 +1 @@ +README.authdebug.html diff --git a/debian/courier-authlib.files b/debian/courier-authlib.files new file mode 100644 index 0000000..6c94de4 --- /dev/null +++ b/debian/courier-authlib.files @@ -0,0 +1,14 @@ +/usr/lib/courier/courier-authlib/ +/usr/lib/courier-authlib/libcourierauth*.so* +/usr/lib/courier-authlib/libauthcustom*.so* +/usr/lib/courier-authlib/libauthpam*.so* +/usr/sbin/authenumerate +/usr/sbin/authpasswd +/usr/sbin/authtest +/usr/sbin/courierlogger +/usr/share/man/man1/authpasswd.1 +/usr/share/man/man1/authtest.1 +/usr/share/man/man1/courierlogger.1 +/usr/share/man/man8/authenumerate.8 + + diff --git a/debian/courier-authlib.postrm b/debian/courier-authlib.postrm new file mode 100644 index 0000000..73adefe --- /dev/null +++ b/debian/courier-authlib.postrm @@ -0,0 +1,25 @@ +#! /bin/sh -e +# +# Copyright 2000,2001 by Stefan Hornburg (Racke) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + +if [ "$1" = "purge" ]; then + # remove runtime files + rm -rf /var/run/courier/authdaemon +fi + +#DEBHELPER# diff --git a/debian/courier_perms b/debian/courier_perms new file mode 100644 index 0000000..9a054a1 --- /dev/null +++ b/debian/courier_perms @@ -0,0 +1,105 @@ +#!/usr/bin/perl -w + +=head1 NAME + +dh_perms - set some special permissions after dh_fixperms + +=cut + +use strict; +use Debian::Debhelper::Dh_Lib; + +=head1 SYNOPSIS + +B [S>] + +=head1 DESCRIPTION + +dh_perms is a debhelper program that is responsible for setting the +permissions of files and directories according to the information in +debian/permissions. It is intended to be run after dh_fixperms. + +The file debian/permissions is a tab seperated file where the first column +contains a filename, the second one the permissions in octal format, the +third one the owner and the fourth one the group. A dash in columns 2 to 4 +means that this information will not be modified. + +=head1 OPTIONS + +=over 4 + +None except the standard debhelper options. + +=back + +=cut + +init(); + +my %perms; +my %owners; +my %groups; + +# TODO: There should be a way to change this by command-line +my $permfile = "debian/permissions"; + +open PERMFILE, $permfile or exit 0; #print "could not open permfile\n"; +while (my $curline = ) +{ + #NOTE: Broken lines are not always detected. (e.g. not defining anything valid) + + # remove lineend + chomp($curline); + # skip comments/empty lines + next if $curline =~ /^#/ || $curline !~ /\S/; + (my $filename, my $octmode, my $owner, my $group) = split (/\s+/, $curline); + + die qq{$0: could not accept "$curline": wrong octmode $octmode\n} unless $octmode =~ /^[0-7]{3,4}$/; + $perms{$filename} = $octmode unless $octmode eq "-" or not defined $octmode; + + $owner = getpwnam($owner) if defined getpwnam($owner); + $owners{$filename} = $owner unless $owner eq "-" or not defined $owner; + + $group = getgrnam($group) if defined getpwnam($group); + $groups{$filename} = $group unless $group eq "-" or not defined $group; + +} +close PERMFILE; + + +foreach my $package (@{$dh{DOPACKAGES}}) { + my $tmp=tmpdir($package); + foreach my $file (keys %owners) + { + next unless -e $tmp.$file; + chown $owners{$file}, -1, $tmp.$file or die "failed to chown $file"; + verbose_print "chowned file $file to $owners{$file}"; + } + foreach my $file (keys %groups) + { + next unless -e $tmp.$file; + chown -1, $groups{$file}, $tmp.$file or die "failed to chgrp $file"; + verbose_print "chgrped file $file to $groups{$file}"; + } + foreach my $file (keys %perms) + { + next unless -e $tmp.$file; + my $nummod = oct("0".$perms{$file}); + chmod $nummod, $tmp.$file or die "failed to chmod $file"; + verbose_print "chmoded file $file to ".sprintf("0%o", $nummod); + } + +} + +=head1 SEE ALSO + +L + +This program is not yet part of debhelper. + +=head1 AUTHOR + +Willi Mann + +=cut + diff --git a/debian/permissions b/debian/permissions new file mode 100644 index 0000000..6e70307 --- /dev/null +++ b/debian/permissions @@ -0,0 +1,9 @@ +/etc/courier/authldaprc 660 daemon daemon +/etc/courier/authpgsqlrc 660 daemon daemon +/etc/courier/authmysqlrc 660 daemon daemon +/etc/courier/authdaemonrc 660 daemon daemon +/var/run/courier 755 daemon daemon +/var/run/courier/authdaemon 750 daemon daemon + + + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..2a13678 --- /dev/null +++ b/debian/rules @@ -0,0 +1,191 @@ +#!/usr/bin/make -f +# +# Copyright 2004,2005,2008 by Stefan Hornburg (Racke) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + +BUILD=$(shell pwd)/debian/tmp +RELUP=$(shell dpkg-parsechangelog | perl -ne 'print $$1 if /^Version: (.*?)-(.*)$$/') + +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +# Common configuration options +NONSSL_CONFOPTS=--without-certdb --without-authpgsql + +COMMON_CONFOPTS=--prefix=/usr --mandir=\$${prefix}/share/man \ + --with-authdaemonvar=/var/run/courier/authdaemon \ + --sysconfdir=/etc/courier \ + --with-pkgconfdir=/etc/courier \ + --libexecdir=\$${prefix}/lib/courier \ + --datadir=\$${prefix}/lib/courier \ + --localstatedir=/var/lib/courier \ + --sbindir=\$${exec_prefix}/sbin \ + --with-mailuser=daemon \ + --with-mailgroup=daemon \ + --without-socks \ + --with-authpam \ + --with-authpipe \ + --without-authpwd \ + --with-authmysql \ + --with-mysql-includes=/usr/include/mysql \ + --with-mysql-libs=/usr/lib \ + --with-authmysqlrc=/etc/courier/authmysqlrc \ + --with-authpgsql \ + --with-pgsql-includes=`pg_config --includedir` \ + --with-pgsql-libs=/usr/lib \ + --with-authpgsqlrc=/etc/courier/authpgsqlrc \ + --without-authshadow \ + --with-authdaemonvar=/var/run/courier/authdaemon \ + --with-authldap \ + --with-authldaprc=/etc/courier/authldaprc \ + --with-authcram \ + --with-db=gdbm \ + --without-fcgi \ + --with-htmllibdir=/usr/share/sqwebmail \ + --with-ispell=/usr/bin/ispell \ + --enable-userdb \ + --enable-syslog=1 \ + --disable-root-check + +check: + dh_testdir + +# check umask + if [ `umask` != "0022" ]; then echo "You need to set umask to 022 in order to compile/build courier"; exit 1; fi + chmod +x debian/courier_perms + +build: check +# create a list of files that currently exists + if [ ! -f stamp-build ]; then \ + if [ -d /usr/include/postgresql/8.0/libpq_fe.h ]; then \ + LDFLAGS=-lcrypt ./configure $(COMMON_CONFOPTS) \ + --with-postgresql-includes=/usr/include/postgresql/8.0 \ + && $(MAKE) && touch stamp-build; \ + else \ + LDFLAGS=-lcrypt ./configure $(COMMON_CONFOPTS) \ + --with-postgresql-includes=/usr/include/postgresql \ + && $(MAKE) && touch stamp-build; \ + fi \ + fi + +stamp-build: build + +clean: check + dh_testroot + rm -f stamp-build stamp-install + +# Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) clean + dh_clean + +install: check stamp-build + dh_testroot + dh_clean -k + dh_installdirs + +# Add here commands to install the package into debian/tmp. + $(MAKE) DESTDIR=$(BUILD) install + +# (cd $(BUILD)/usr/lib/courier/courier-authlib/changepwd; ln -fs ../../authsystem.passwd ./authsystem.passwd) + +# Install authentification test program +# mv $(BUILD)/usr/sbin/authtest $(BUILD)/usr/sbin/courierauthtest + +# Additional manpages + pod2man --center='Debian GNU/Linux Documentation' --release='Debian GNU/Linux '`cat /etc/debian_version` --section=8 debian/authenumerate.pod > $(BUILD)/usr/share/man/man8/authenumerate.8 +# pod2man --center='Debian GNU/Linux Documentation' --release='Debian GNU/Linux '`cat /etc/debian_version` --section=8 debian/courierauthtest.pod > $(BUILD)/usr/share/man/man8/courierauthtest.8 + +# Symlinks for userdb manpages + (cd $(BUILD)/usr/share/man/man8 && ln -s makeuserdb.8.gz pw2userdb.8.gz) + + dh_installdocs +# - change authentification default settings + perl -pe 's/^authmodulelist=".*?"/authmodulelist="authpam"/' $(BUILD)/etc/courier/authdaemonrc.dist > $(BUILD)/etc/courier/authdaemonrc +# - change default LDAP server + perl -pe 's/^(LDAP_SERVER\s+)ldap.example.com/$$1localhost/' $(BUILD)/etc/courier/authldaprc.dist > $(BUILD)/etc/courier/authldaprc +# - change default MySQL server + perl -pe 's/^(MYSQL_SERVER\s+)mysql.example.com/$$1localhost/;s%^(#?\s*MYSQL_SOCKET\s+)/.*%$$1/var/run/mysqld/mysqld.sock%' $(BUILD)/etc/courier/authmysqlrc.dist > $(BUILD)/etc/courier/authmysqlrc + mv $(BUILD)/etc/courier/authpgsqlrc.dist $(BUILD)/etc/courier/authpgsqlrc + rm $(BUILD)/etc/courier/*.dist + +# This seems to be necessary for building in fakeroot +# environment (otherwise dh_strip fails) +# set all binaries to 755, by checking if user has x-bit +# debian/courier_perms will set the right permissions + find $(BUILD) -perm -u+x -type f | xargs chmod u+rwx,go+rx + + dh_movefiles + +# Check if all files have moved out + if [ `find $(BUILD) -not -type d | wc -l` -ne 0 ]; then find $(BUILD) -not -type d; echo "File(s) found not belonging to any package, please contact maintainer"; exit 1; fi + + touch stamp-install + +stamp-install: install + +# Build architecture-independent files here. +binary-indep: stamp-build stamp-install + dh_testdir + dh_testroot +# dh_installdebconf -i + dh_installexamples -i + dh_installmenu -i + dh_installinit -i + dh_installinfo -i + dh_installchangelogs -i + dh_strip -i + dh_link -i + dh_compress -i + dh_fixperms -i + debian/courier_perms -i + dh_installdeb -i + dh_perl -i + dh_shlibdeps -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: stamp-build stamp-install + dh_testdir + dh_testroot +# dh_installdebconf -a + dh_installexamples -a + dh_installmenu -a + dh_installinit -a + dh_installcron -a + dh_installinfo -a + dh_installchangelogs -a + dh_strip -a + dh_link -a + dh_compress -a + dh_fixperms -a + debian/courier_perms -a + dh_installdeb -a + dh_perl -a + dh_makeshlibs -a + dh_shlibdeps -a + dh_gencontrol -- -VRELUP="$(RELUP)" + dh_md5sums -a + dh_builddeb -a + +binary: binary-arch + +.PHONY: check build clean binary-arch binary install diff --git a/libltdl/config.guess b/libltdl/config.guess index 951383e..ad5281e 100755 --- a/libltdl/config.guess +++ b/libltdl/config.guess @@ -1,10 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2007-05-17' +timestamp='2005-08-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -107,7 +106,7 @@ set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -161,7 +160,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -208,11 +206,8 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -330,7 +325,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*) + i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) @@ -769,19 +764,12 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - *:MINGW*:*) + i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) @@ -791,15 +779,9 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -835,9 +817,6 @@ EOF arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; @@ -872,11 +851,7 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) @@ -895,11 +870,7 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) @@ -948,15 +919,9 @@ EOF sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; - xtensa:Linux:*:*) - echo xtensa-unknown-linux-gnu - exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -999,7 +964,7 @@ EOF LIBC=gnulibc1 # endif #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout @@ -1009,11 +974,7 @@ EOF LIBC=dietlibc #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit @@ -1215,15 +1176,6 @@ EOF SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1233,6 +1185,7 @@ EOF *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1311,9 +1264,6 @@ EOF i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff --git a/libltdl/config.sub b/libltdl/config.sub index c060f44..1c366df 100755 --- a/libltdl/config.sub +++ b/libltdl/config.sub @@ -1,10 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2007-04-29' +timestamp='2005-07-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -120,9 +119,8 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -173,10 +171,6 @@ case $os in -hiux*) os=-hiuxwe2 ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -193,10 +187,6 @@ case $os in # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -241,16 +231,15 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ + | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -268,27 +257,28 @@ case $basic_machine in | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ - | mt \ + | ms1 \ | msp430 \ - | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; + m32c) + basic_machine=$basic_machine-unknown + ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -296,9 +286,6 @@ case $basic_machine in ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; - ms1) - basic_machine=mt-unknown - ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -318,18 +305,18 @@ case $basic_machine in | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ + | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ + | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -349,30 +336,31 @@ case $basic_machine in | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ - | mt-* \ + | ms1-* \ | msp430-* \ - | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; + m32c-*) + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -683,10 +671,6 @@ case $basic_machine in basic_machine=i386-pc os=-mingw32 ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) basic_machine=m68000-convergent ;; @@ -712,9 +696,6 @@ case $basic_machine in basic_machine=i386-pc os=-msdos ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; mvs) basic_machine=i370-ibm os=-mvs @@ -822,12 +803,6 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -884,10 +859,6 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -914,10 +885,6 @@ case $basic_machine in sb1el) basic_machine=mipsisa64sb1el-unknown ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; sei) basic_machine=mips-sei os=-seiux @@ -929,9 +896,6 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; - sh5el) - basic_machine=sh5le-unknown - ;; sh64) basic_machine=sh64-unknown ;; @@ -1137,7 +1101,7 @@ case $basic_machine in sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -1210,23 +1174,21 @@ case $os in | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1378,12 +1340,6 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; *-acorn) os=-riscix1.2 ;; @@ -1393,9 +1349,9 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1421,9 +1377,6 @@ case $basic_machine in m68*-cisco) os=-aout ;; - mep-*) - os=-elf - ;; mips*-cisco) os=-elf ;;