Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Andraž Levstik (83dc565bf5c2b739aca4f0c78f57d0475e5ad315)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Andraž Levstik <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Andraž Levstik (83dc565bf5c2b739aca4f0c78f57d0475e5ad315)
  • Date: Wed, 31 Mar 2010 00:31:46 -0500

GIT changes to master grimoire by Andraž Levstik
<ruskie+2054d253 AT codemages.net>:

http/lighttpd/CONFIGURE | 1
http/lighttpd/HISTORY | 5
http/lighttpd/PRE_BUILD | 4
http/lighttpd/external_auth_program-1.4.25.patch | 183
+++++++++++++++++++++++
mail/alpine/DETAILS | 2
mail/alpine/HISTORY | 4
mail/alpine/PRE_BUILD | 4
7 files changed, 201 insertions(+), 2 deletions(-)

New commits:
commit 83dc565bf5c2b739aca4f0c78f57d0475e5ad315
Author: Andraž Levstik <ruskie+2054d253 AT codemages.net>
Commit: Andraž Levstik <ruskie+2054d253 AT codemages.net>

lighttpd: added external auth program feature patch forward ported from
lighttpd bug 1985(wontfix by upstream)

commit 5e3e39fcf909329650c04d21b5cea89641b54fc2
Author: Andraž Levstik <ruskie+2054d253 AT codemages.net>
Commit: Andraž Levstik <ruskie+2054d253 AT codemages.net>

alpine: update topal to 72, fixes bug 15633

diff --git a/http/lighttpd/CONFIGURE b/http/lighttpd/CONFIGURE
index 0c98245..bb050b2 100755
--- a/http/lighttpd/CONFIGURE
+++ b/http/lighttpd/CONFIGURE
@@ -1,2 +1,3 @@
+config_query LIGHTTPD_EXTAUTH "Do you want to patch in external
authentication program support?" n &&
config_query_option LIGHTTPD_OPTS "Do you want webdav support?" n \
"--with-webdav-props" "--without-webdav-props"
diff --git a/http/lighttpd/HISTORY b/http/lighttpd/HISTORY
index ffbf441..62da7c0 100644
--- a/http/lighttpd/HISTORY
+++ b/http/lighttpd/HISTORY
@@ -1,3 +1,8 @@
+2010-03-31 Andraž "ruskie" Levstik <ruskie+f03a580f AT codemages.net>
+ * CONFIGURE: query for patch
+ * PRE_BUILD: optionally apply patch
+ * external_auth_program-1.4.25.patch: added patch
+
2010-03-27 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS: PATCHLEVEL=1
* network-ssl.patch: added, to fix working with the newest openssl (n)
diff --git a/http/lighttpd/PRE_BUILD b/http/lighttpd/PRE_BUILD
index debbf53..6aa59ba 100755
--- a/http/lighttpd/PRE_BUILD
+++ b/http/lighttpd/PRE_BUILD
@@ -2,3 +2,7 @@ default_pre_build &&
cd "$SOURCE_DIRECTORY" &&

patch -p0 < "$SPELL_DIRECTORY/network-ssl.patch"
+if [[ $LIGHTTPD_EXTAUTH == y ]]; then
+patch -p0 < $SPELL_DIRECTORY/external_auth_program-1.4.25.patch
+fi
+
diff --git a/http/lighttpd/external_auth_program-1.4.25.patch
b/http/lighttpd/external_auth_program-1.4.25.patch
new file mode 100644
index 0000000..c1296c0
--- /dev/null
+++ b/http/lighttpd/external_auth_program-1.4.25.patch
@@ -0,0 +1,183 @@
+--- src/http_auth.h.orig 2010-01-02 17:58:11.000000000 +0100
++++ src/http_auth.h 2010-01-02 17:59:17.000000000 +0100
+@@ -14,7 +14,8 @@
+ AUTH_BACKEND_PLAIN,
+ AUTH_BACKEND_LDAP,
+ AUTH_BACKEND_HTPASSWD,
+- AUTH_BACKEND_HTDIGEST
++ AUTH_BACKEND_HTDIGEST,
++ AUTH_BACKEND_PROGRAM
+ } auth_backend_t;
+
+ typedef struct {
+@@ -38,6 +39,8 @@
+ unsigned short auth_ldap_starttls;
+ unsigned short auth_ldap_allow_empty_pw;
+
++ buffer *auth_program_exec;
++
+ unsigned short auth_debug;
+
+ /* generated */
+--- src/http_auth.c.orig 2010-01-02 17:58:11.000000000 +0100
++++ src/http_auth.c 2010-01-02 18:02:34.000000000 +0100
+@@ -287,6 +287,8 @@
+ stream_close(&f);
+ } else if (p->conf.auth_backend == AUTH_BACKEND_LDAP) {
+ ret = 0;
++ } else if (p->conf.auth_backend == AUTH_BACKEND_PROGRAM) {
++ ret = 0;
+ } else {
+ return -1;
+ }
+@@ -827,6 +829,57 @@
+
+ return 0;
+ #endif
++ } else if (p->conf.auth_backend == AUTH_BACKEND_PROGRAM) {
++ buffer *progbuf = p->conf.auth_program_exec;
++ const char *prog;
++ FILE *pipe;
++ int ret;
++
++ /*
++ * This is tested when loading configuration,
++ * but better be paranoid.
++ */
++ if(!progbuf || progbuf->used == 0) {
++ log_error_write(srv, __FILE__, __LINE__, "s",
++ "Missing 'auth.backend.program.exec'
directive");
++ return -1;
++ }
++ prog = progbuf->ptr;
++ /*
++ * Preliminary check, so we can have better error reporting.
++ * It was tested during configuration reading, but maybe
++ * something happened to the program since that time.
++ *
++ * If someone mess with the program after this test, it
++ * would simply fail in the popen()/pclose() which we check
anyway.
++ */
++ if(access(prog, F_OK | X_OK) < 0) {
++ log_error_write(srv, __FILE__, __LINE__, "ssss",
++ "auth.backend.program: Failed
access(",
++ prog,
++ "): ",
++ strerror(errno));
++ return -1;
++ }
++ if((pipe = popen(prog, "w")) == NULL) {
++ log_error_write(srv, __FILE__, __LINE__, "ssss",
++ "Failed popen(",
++ prog,
++ "): ",
++ strerror(errno));
++ return -1;
++ }
++ fprintf(pipe, "%s:%s\n", username->ptr, pw);
++ if((ret = pclose(pipe)) != 0) {
++ log_error_write(srv, __FILE__, __LINE__, "sssds",
++ "Failed pclose(", prog, "):", ret,
strerror(errno));
++ return -1;
++ }
++ if (p->conf.auth_debug) {
++ log_error_write(srv, __FILE__, __LINE__, "ss",
++ "auth.backend.program success for: ",
username->ptr);
++ }
++ return 0;
+ }
+ return -1;
+ }
+--- src/mod_auth.c.orig 2010-01-02 17:58:11.000000000 +0100
++++ src/mod_auth.c 2010-01-02 18:08:14.000000000 +0100
+@@ -82,6 +82,7 @@
+
+ if (s->ldap) ldap_unbind_s(s->ldap);
+ #endif
++ buffer_free(s->auth_program_exec);
+
+ free(s);
+ }
+@@ -119,6 +120,7 @@
+ PATCH(ldap_filter_pre);
+ PATCH(ldap_filter_post);
+ #endif
++ PATCH(auth_program_exec);
+
+ /* skip the first, the global context */
+ for (i = 1; i < srv->config_context->used; i++) {
+@@ -169,6 +171,8 @@
+ PATCH(auth_ldap_bindpw);
+ } else if (buffer_is_equal_string(du->key,
CONST_STR_LEN("auth.backend.ldap.allow-empty-pw"))) {
+ PATCH(auth_ldap_allow_empty_pw);
++ } else if (buffer_is_equal_string(du->key,
CONST_STR_LEN("auth.backend.program.exec"))) {
++ PATCH(auth_program_exec);
+ }
+ }
+ }
+@@ -326,7 +330,8 @@
+ { "auth.backend.ldap.allow-empty-pw", NULL,
T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 11 */
+ { "auth.backend.htdigest.userfile", NULL, T_CONFIG_STRING,
T_CONFIG_SCOPE_CONNECTION }, /* 12 */
+ { "auth.backend.htpasswd.userfile", NULL, T_CONFIG_STRING,
T_CONFIG_SCOPE_CONNECTION }, /* 13 */
+- { "auth.debug", NULL, T_CONFIG_SHORT,
T_CONFIG_SCOPE_CONNECTION }, /* 14 */
++ { "auth.backend.program.exec", NULL, T_CONFIG_STRING,
T_CONFIG_SCOPE_CONNECTION }, /* 14 */
++ { "auth.debug", NULL, T_CONFIG_SHORT,
T_CONFIG_SCOPE_CONNECTION }, /* 15 */
+ { NULL, NULL, T_CONFIG_UNSET,
T_CONFIG_SCOPE_UNSET }
+ };
+
+@@ -352,6 +357,7 @@
+ s->auth_ldap_filter = buffer_init();
+ s->auth_ldap_cafile = buffer_init();
+ s->auth_ldap_starttls = 0;
++ s->auth_program_exec = buffer_init();
+ s->auth_debug = 0;
+
+ s->auth_require = array_init();
+@@ -376,7 +382,8 @@
+ cv[11].destination = &(s->auth_ldap_allow_empty_pw);
+ cv[12].destination = s->auth_htdigest_userfile;
+ cv[13].destination = s->auth_htpasswd_userfile;
+- cv[14].destination = &(s->auth_debug);
++ cv[14].destination = s->auth_program_exec;
++ cv[15].destination = &(s->auth_debug);
+
+ p->config_storage[i] = s;
+ ca = ((data_config *)srv->config_context->data[i])->value;
+@@ -394,6 +401,8 @@
+ s->auth_backend = AUTH_BACKEND_PLAIN;
+ } else if (0 == strcmp(s->auth_backend_conf->ptr,
"ldap")) {
+ s->auth_backend = AUTH_BACKEND_LDAP;
++ } else if (0 == strcmp(s->auth_backend_conf->ptr,
"program")) {
++ s->auth_backend = AUTH_BACKEND_PROGRAM;
+ } else {
+ log_error_write(srv, __FILE__, __LINE__,
"sb", "auth.backend not supported:", s->auth_backend_conf);
+
+@@ -534,6 +543,28 @@
+ return (ret);
+ break;
+ }
++ case AUTH_BACKEND_PROGRAM: {
++ const char *prog;
++ /*
++ * Let's make some sanity checks so we detect
them during
++ * startup and not only when trying to
authenticate.
++ */
++ if(!(s->auth_program_exec) ||
s->auth_program_exec->used == 0) {
++ log_error_write(srv, __FILE__, __LINE__, "s",
++ "Missing or empty
auth.backend.program.exec");
++ return HANDLER_ERROR;
++ }
++ prog = s->auth_program_exec->ptr;
++ if(access(prog, F_OK | X_OK) < 0) {
++ log_error_write(srv, __FILE__, __LINE__,
"ssss",
++ "auth.backend.program:
Failed access(",
++ prog,
++ "): ",
++ strerror(errno));
++ return HANDLER_ERROR;
++ }
++ break;
++ }
+ default:
+ break;
+ }
diff --git a/mail/alpine/DETAILS b/mail/alpine/DETAILS
index 576ff34..3e896b5 100755
--- a/mail/alpine/DETAILS
+++ b/mail/alpine/DETAILS
@@ -68,7 +68,7 @@ if [[ $ALPINE_CHAPPA == y ]]; then

SOURCE21_URL[0]=http://staff.washington.edu/chappa/alpine/patches/alpine-2.00/maildir.patch.gz
fi
if [[ $ALPINE_TOPAL == y ]]; then
- VERSION3=70
+ VERSION3=72
SOURCE22=topal-package-$VERSION3.tgz
SOURCE23=topal-package-$VERSION3.tgz.asc

SOURCE22_URL[0]=http://homepage.ntlworld.com/phil.brooke/topal/rel-$VERSION3/$SOURCE22
diff --git a/mail/alpine/HISTORY b/mail/alpine/HISTORY
index f94193f..a11c4bc 100644
--- a/mail/alpine/HISTORY
+++ b/mail/alpine/HISTORY
@@ -1,3 +1,7 @@
+2010-03-31 Andraž "ruskie" Levstik <ruskie+f03a580f AT codemages.net>
+ * DETAILS: topal update to 72, fixes bug 15633
+ * PRE_BUILD: fix to build a native mime-tool
+
2009-11-27 Andraž "ruskie" Levstik <ruskie+f03a580f AT codemages.net>
* DETAILS: version update to re-alpine
* PREPARE: updated for patches
diff --git a/mail/alpine/PRE_BUILD b/mail/alpine/PRE_BUILD
index e2f2a2f..f32158c 100755
--- a/mail/alpine/PRE_BUILD
+++ b/mail/alpine/PRE_BUILD
@@ -23,6 +23,8 @@ fi &&
if [[ $ALPINE_TOPAL == y ]]; then
unpack_file 22 &&
patch -p1 < topal-$VERSION3/$SPELL-2.00.patch-1 &&
-patch -p1 < topal-$VERSION3/$SPELL-2.00.patch-2
+patch -p1 < topal-$VERSION3/$SPELL-2.00.patch-2 &&
+rm -f topal-$VERSION3/MIME-tool/mime-tool &&
+sed -i "s:\-Wall \-O2:\-Wall $CFLAGS:" topal-$VERSION3/Makefile
fi




  • [SM-Commit] GIT changes to master grimoire by Andraž Levstik (83dc565bf5c2b739aca4f0c78f57d0475e5ad315), Andraž Levstik, 03/31/2010

Archive powered by MHonArc 2.6.24.

Top of Page