This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU Mailutils".
http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=02634d3bf0932b8bde43a881d67760f38e3f9e9f The branch, master has been updated via 02634d3bf0932b8bde43a881d67760f38e3f9e9f (commit) from 0ac52e06cb1cb91602ee4dc4de32f66423e96b32 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 02634d3bf0932b8bde43a881d67760f38e3f9e9f Author: Sergey Poznyakoff <g...@gnu.org.ua> Date: Thu Mar 17 01:30:34 2011 +0200 Bugfixes. * comsat/action.c (action_echo): Set omit_newline. * libmailutils/mailbox/mbx_default.c: Return 0 on success. Fix memory overrun. * libproto/mailer/smtp.c (smtp_open): Protect tls-related code with #ifdef WITH_TLS. * libproto/pop/mbox.c (pop_open): Likewise. * mu/imap.c (com_connect): Likewise. * mh/mhn.c (split_args): Preserve quotes. (mhn_compose_command): Handle type arguments (%a escape). (mhn_show_command): Likewise. (store_handler): Fix call to mh_getyn. (edit_mime): Pass typeargs to mhn_compose_command. Fix test for missing filename. * mh/tests/ali.at (ali04): The test wrongly assumed that the `root' group has some members. * mh/tests/folder.at: Always sort the output from find. * mh/tests/rmf.at: Likewise. * mh/tests/mhn.at: Likewise. Filter out timestamps from the tar output produced by mhn. * tests/testsuite.at (MH_SETUP): Define moreproc. * mh/tests/mhparam.at: Account for changes in mh_profile ----------------------------------------------------------------------- Summary of changes: comsat/action.c | 3 ++ libmailutils/mailbox/mbx_default.c | 5 +-- libproto/mailer/smtp.c | 3 +- libproto/pop/mbox.c | 5 ++- mh/mhn.c | 57 +++++++++++++++++++++++++++--------- mh/tests/ali.at | 9 ++--- mh/tests/folder.at | 4 +- mh/tests/install-mh.at | 2 +- mh/tests/mhn.at | 35 ++++++++++++++++------ mh/tests/mhparam.at | 1 + mh/tests/rmf.at | 4 +- mh/tests/send.at | 2 +- mh/tests/testsuite.at | 1 + mu/imap.c | 11 +++---- 14 files changed, 95 insertions(+), 47 deletions(-) diff --git a/comsat/action.c b/comsat/action.c index a5a5ff7..81cdf28 100644 --- a/comsat/action.c +++ b/comsat/action.c @@ -353,6 +353,9 @@ action_echo (struct biffrc_environ *env, size_t argc, char **argv) omit_newline = 1; i++; } + else + omit_newline = 0; + for (;;) { echo_string (env->tty, argv[i]); diff --git a/libmailutils/mailbox/mbx_default.c b/libmailutils/mailbox/mbx_default.c index f44bbef..0556304 100644 --- a/libmailutils/mailbox/mbx_default.c +++ b/libmailutils/mailbox/mbx_default.c @@ -136,14 +136,13 @@ mu_folder_directory () int mu_construct_user_mailbox_url (char **pout, const char *name) { - int rc; const char *pat = mu_mailbox_url (); const char *env[3]; struct mu_wordsplit ws; env[0] = "user"; env[1] = (char*) name; - env[3] = NULL; + env[2] = NULL; ws.ws_env = env; if (mu_wordsplit (pat, &ws, MU_WRDSF_NOSPLIT | MU_WRDSF_NOCMD | @@ -162,7 +161,7 @@ mu_construct_user_mailbox_url (char **pout, const char *name) mu_wordsplit_free (&ws); if (!*pout) return ENOMEM; - return rc; + return 0; } /* Is this a security risk? */ diff --git a/libproto/mailer/smtp.c b/libproto/mailer/smtp.c index e5026fe..fdda4b6 100644 --- a/libproto/mailer/smtp.c +++ b/libproto/mailer/smtp.c @@ -182,6 +182,7 @@ smtp_open (mu_mailer_t mailer, int flags) if (rc) return rc; +#ifdef WITH_TLS if (!notls && mu_tls_enable && mu_smtp_capa_test (smtp_mailer->smtp, "STARTTLS", NULL) == 0) { @@ -193,7 +194,7 @@ smtp_open (mu_mailer_t mailer, int flags) return rc; } } - +#endif if (!noauth && mu_smtp_capa_test (smtp_mailer->smtp, "AUTH", NULL) == 0) { rc = mu_smtp_auth (smtp_mailer->smtp); diff --git a/libproto/pop/mbox.c b/libproto/pop/mbox.c index b60c66e..3a9102b 100644 --- a/libproto/pop/mbox.c +++ b/libproto/pop/mbox.c @@ -173,7 +173,8 @@ pop_open (mu_mailbox_t mbox, int flags) if (status) break; - if (WITH_TLS && !mpd->pops && +#ifdef WITH_TLS + if (!mpd->pops && mu_url_sget_param (mbox->url, "notls", NULL) == MU_ERR_NOENT && mu_pop3_capa_test (mpd->pop3, "STLS", NULL) == 0) { @@ -181,7 +182,7 @@ pop_open (mu_mailbox_t mbox, int flags) if (status) break; } - +#endif status = mu_authority_authenticate (mbox->folder->authority); } while (0); diff --git a/mh/mhn.c b/mh/mhn.c index 0c36d72..cb634ca 100644 --- a/mh/mhn.c +++ b/mh/mhn.c @@ -208,7 +208,8 @@ split_args (const char *argstr, size_t len, int *pargc, char ***pargv) ws.ws_delim = ";"; if (mu_wordsplit_len (argstr, len, &ws, - MU_WRDSF_DEFFLAGS | MU_WRDSF_DELIM | MU_WRDSF_WS)) + (MU_WRDSF_DEFFLAGS & ~MU_WRDSF_QUOTE) | + MU_WRDSF_DELIM | MU_WRDSF_WS)) { mu_error (_("cannot split line `%s': %s"), argstr, mu_wordsplit_strerror (&ws)); @@ -629,10 +630,11 @@ _mhn_profile_get (const char *prefix, const char *type, const char *subtype, } char * -mhn_compose_command (char *typestr, int *flags, char *file) +mhn_compose_command (char *typestr, char *typeargs, int *flags, char *file) { const char *p, *str; - char *type, *subtype, *typeargs; + char *type, *subtype, **typeargv = NULL; + int typeargc = 0; struct obstack stk; split_content (typestr, &type, &subtype); @@ -660,7 +662,20 @@ mhn_compose_command (char *typestr, int *flags, char *file) { case 'a': /* additional arguments */ - obstack_grow (&stk, typeargs, strlen (typeargs)); + if (typeargs) + { + int i; + + if (!typeargv) + split_args (typeargs, strlen (typeargs), + &typeargc, &typeargv); + for (i = 0; i < typeargc; i++) + { + if (i > 0) + obstack_1grow (&stk, ' '); + obstack_grow (&stk, typeargv[i], strlen (typeargv[i])); + } + } break; case 'F': @@ -688,7 +703,8 @@ mhn_compose_command (char *typestr, int *flags, char *file) free (type); free (subtype); - + mu_argcv_free (typeargc, typeargv); + str = obstack_finish (&stk); p = mu_str_skip_class (str, MU_CTYPE_SPACE); if (!*p) @@ -755,6 +771,8 @@ mhn_show_command (mu_message_t msg, msg_part_t part, int *flags, struct obstack stk; mu_header_t hdr; char *temp_cmd = NULL; + int typeargc = 0; + char **typeargv = NULL; mu_message_get_header (msg, &hdr); _get_content_type (hdr, &typestr, &typeargs); @@ -824,7 +842,20 @@ mhn_show_command (mu_message_t msg, msg_part_t part, int *flags, { case 'a': /* additional arguments */ - obstack_grow (&stk, typeargs, strlen (typeargs)); + if (typeargs) + { + int i; + + if (!typeargv) + split_args (typeargs, strlen (typeargs), + &typeargc, &typeargv); + for (i = 0; i < typeargc; i++) + { + if (i > 0) + obstack_1grow (&stk, ' '); + obstack_grow (&stk, typeargv[i], strlen (typeargv[i])); + } + } break; case 'e': @@ -883,6 +914,7 @@ mhn_show_command (mu_message_t msg, msg_part_t part, int *flags, free (type); free (subtype); free (temp_cmd); + mu_argcv_free (typeargc, typeargv); str = obstack_finish (&stk); p = mu_str_skip_class (str, MU_CTYPE_SPACE); @@ -1745,12 +1777,9 @@ store_handler (mu_message_t msg, msg_part_t part, char *type, char *encoding, if (!(mode_options & OPT_QUIET) && access (name, R_OK) == 0) { - char *p; int ok; - mu_asprintf (&p, _("File %s already exists. Rewrite"), name); - ok = mh_getyn (p); - free (p); + ok = mh_getyn (_("File %s already exists. Rewrite"), name); if (!ok) { free (name); @@ -2429,7 +2458,7 @@ edit_mime (char *cmd, struct compose_env *env, mu_message_t *msg, int level) mu_body_t body; mu_stream_t in, out = NULL, fstr; char *encoding; - char *p, *typestr; + char *typestr, *typeargs; char *shell_cmd; int flags; @@ -2442,8 +2471,8 @@ edit_mime (char *cmd, struct compose_env *env, mu_message_t *msg, int level) mu_rtrim_class (cmd, MU_CTYPE_SPACE); - _get_content_type (hdr, &typestr, NULL); - shell_cmd = mhn_compose_command (typestr, &flags, cmd); + _get_content_type (hdr, &typestr, &typeargs); + shell_cmd = mhn_compose_command (typestr, typeargs, &flags, cmd); free (typestr); /* Open the input stream, whatever it is */ @@ -2452,7 +2481,7 @@ edit_mime (char *cmd, struct compose_env *env, mu_message_t *msg, int level) if (mhn_exec (&in, cmd, flags)) return 1; } - else if (p == cmd) + else if (cmd[0] == 0) { mu_error (_("%s:%lu: missing filename"), input_file, diff --git a/mh/tests/ali.at b/mh/tests/ali.at index 36c1f40..8b640c7 100644 --- a/mh/tests/ali.at +++ b/mh/tests/ali.at @@ -74,11 +74,10 @@ ali: mh_aliases2:2: `mh_aliases' already included at top level ]) MH_CHECK([ali: group name],[ali04 ali-group-name],[ -grep ^root: /etc/group >/dev/null || AT_SKIP_TEST -AT_DATA([mh_aliases],[ -korzen: =root -]) -awk -F : '$1=="root" { print $4 }' /etc/group | tr -d ' ' > expout +awk -F : '$4!="" { print $1; print $4; exit 0 }' /etc/group > tmpout +test -s tmpout || AT_SKIP_TEST +sed -n '1s/.*/korzen: =&/p' tmpout > mh_aliases +sed '1d' tmpout | tr -d ' ' > expout ali -a ./mh_aliases korzen | tr -d ' ' ], [0], diff --git a/mh/tests/folder.at b/mh/tests/folder.at index f2e3314..8d89d9e 100644 --- a/mh/tests/folder.at +++ b/mh/tests/folder.at @@ -87,7 +87,7 @@ do mv Mail/inbox/$i Mail/inbox/${i}0 done folder -pack || exit $? -find Mail/inbox +find Mail/inbox | sort ], [0], [Mail/inbox @@ -105,7 +105,7 @@ do mv Mail/inbox/$i Mail/inbox/${i}0 done folder --pack=1 || exit $? -find Mail/inbox +find Mail/inbox | sort ], [0], [Mail/inbox diff --git a/mh/tests/install-mh.at b/mh/tests/install-mh.at index 981e2c4..e5be717 100644 --- a/mh/tests/install-mh.at +++ b/mh/tests/install-mh.at @@ -21,7 +21,7 @@ AT_CHECK([ mkdir home dir=`cd home; pwd` HOME=$dir MH=$dir/mh_profile install-mh -auto || exit $? -find home +find home | sort HOME=$dir MH=$dir/mh_profile install-mh -auto 2>errout echo $? cat errout diff --git a/mh/tests/mhn.at b/mh/tests/mhn.at index bd75887..7316b1c 100644 --- a/mh/tests/mhn.at +++ b/mh/tests/mhn.at @@ -192,7 +192,7 @@ chmod +w Mail/inbox/4 echo "mhn-store-application: %%-%m%P.%s-%p" >> $MH mhn +inbox -store 4 | remove_curdir || exit $? -find . -name '%*' +find . -name '%*' | sort ], [0], [storing message 4 part 1 as file 4.1.plain @@ -333,7 +333,12 @@ And the mome raths outgrabe. MH_CHECK([mhn-show type=tar],[mhn13 mhn-show-type=tar],[ MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mime,[Mail/inbox]) -mhn -show 2 | sed /^X-IMAPbase/d +AT_DATA([filter.awk],[ +/^X-IMAPbase/ { next } +/^-rw-r--r--/ { print $1, $2, $3, $6; next } +{ print } +]) +mhn -show 2 | awk -f filter.awk ], [0], [Date: Mon, 29 Nov 2010 14:04:19 +0200 @@ -348,8 +353,8 @@ X-Envelope-Sender: g...@example.net part 1 text/plain 15 Initial text. --rw-r--r-- gray/staff 1418 2010-11-29 13:58 Father_William --rw-r--r-- gray/staff 937 2010-11-29 13:58 Jabberwocky +-rw-r--r-- gray/staff 1418 Father_William +-rw-r--r-- gray/staff 937 Jabberwocky ]) # FIXME: What about exit code? @@ -379,7 +384,12 @@ MH_CHECK([mhn-show- variable (with subtype)], [mhn15 mhn-show-with-subtype],[ MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mime,[Mail/inbox]) echo "mhn-show-application/x-tar: %ltar tvf '%F'" >> $MH -mhn -show 1 | sed '/^X-IMAPbase/d;s/ *$//' +AT_DATA([filter.awk],[ +/^X-IMAPbase/ { next } +/^-rw-r--r--/ { print $1, $2, $3, $6; next } +{ sub(/ *$/,""); print } +]) +mhn -show 1 | awk -f filter.awk ], [0], [Date: Mon, 29 Nov 2010 14:00:03 +0200 @@ -395,15 +405,20 @@ part 1 text/plain 15 Initial text. part 2 application/x-tar 13835 --rw-r--r-- gray/staff 1418 2010-11-29 13:58 Father_William --rw-r--r-- gray/staff 937 2010-11-29 13:58 Jabberwocky +-rw-r--r-- gray/staff 1418 Father_William +-rw-r--r-- gray/staff 937 Jabberwocky ]) MH_CHECK([mhn-show- variable (without subtype)], [mhn16 mhn-show-without-subtype],[ MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mime,[Mail/inbox]) echo "mhn-show-application: %ltar tvf '%F'" >> $MH -mhn -show 1 | sed '/^X-IMAPbase/d;s/ *$//' +AT_DATA([filter.awk],[ +/^X-IMAPbase/ { next } +/^-rw-r--r--/ { print $1, $2, $3, $6; next } +{ sub(/ *$/,""); print } +]) +mhn -show 1 | awk -f filter.awk ], [0], [Date: Mon, 29 Nov 2010 14:00:03 +0200 @@ -419,8 +434,8 @@ part 1 text/plain 15 Initial text. part 2 application/x-tar 13835 --rw-r--r-- gray/staff 1418 2010-11-29 13:58 Father_William --rw-r--r-- gray/staff 937 2010-11-29 13:58 Jabberwocky +-rw-r--r-- gray/staff 1418 Father_William +-rw-r--r-- gray/staff 937 Jabberwocky ]) dnl ------------------------------------------------------------------- diff --git a/mh/tests/mhparam.at b/mh/tests/mhparam.at index 68be349..9720dd0 100644 --- a/mh/tests/mhparam.at +++ b/mh/tests/mhparam.at @@ -27,6 +27,7 @@ mhparam -all | tr '\t' ' ' | sed 's/^Path:.*/Path: Mail/;s/^mhetcdir:.*/mhetcdir [0], [Path: Mail mhetcdir: dir +moreproc: /bin/cat Sequence-Negation: not Draft-Folder: Mail/drafts Aliasfile: .mh_aliases diff --git a/mh/tests/rmf.at b/mh/tests/rmf.at index 7260673..34b864c 100644 --- a/mh/tests/rmf.at +++ b/mh/tests/rmf.at @@ -21,7 +21,7 @@ MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mbox1,[Mail/inbox]) MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty,[Mail]) echo 'Current-Folder: inbox' > Mail/context rmf +teaparty || exit $? -find Mail -type d +find Mail -type d | sort ], [0], [Mail @@ -33,7 +33,7 @@ MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mbox1,[Mail/inbox]) MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty,[Mail]) echo 'Current-Folder: teaparty' > Mail/context rmf || exit $? -find Mail -type d +find Mail -type d | sort ], [0], [[[+inbox now current]] diff --git a/mh/tests/send.at b/mh/tests/send.at index 3d9d000..ad5154d 100644 --- a/mh/tests/send.at +++ b/mh/tests/send.at @@ -66,7 +66,7 @@ export MTA_APPEND send ./input.1 ./input.2 || exit $? sed 's/: Date: .*/: Date: now/' $MTA_DIAG -find . -name ',input.[[12]]' +find . -name ',input.[[12]]' | sort ], [0], [ENVELOPE FROM: mhtes...@example.net diff --git a/mh/tests/testsuite.at b/mh/tests/testsuite.at index 5565182..36e708a 100644 --- a/mh/tests/testsuite.at +++ b/mh/tests/testsuite.at @@ -24,6 +24,7 @@ export MH cat > $MH <<EOT Path: $curdir/Mail mhetcdir: $abs_top_srcdir/mh/etc +moreproc: /bin/cat EOT MTSTAILOR=$curdir/mtstailor export MTSTAILOR diff --git a/mu/imap.c b/mu/imap.c index bb32f1e..85a27a3 100644 --- a/mu/imap.c +++ b/mu/imap.c @@ -180,13 +180,12 @@ com_connect (int argc, char **argv) { if (strcmp (argv[i], "-tls") == 0) { - if (WITH_TLS) +#ifdef WITH_TLS tls = 1; - else - { - mu_error ("TLS not supported"); - return 0; - } +#else + mu_error ("TLS not supported"); + return 0; +#endif } else break; hooks/post-receive -- GNU Mailutils _______________________________________________ Commit-mailutils mailing list Commit-mailutils@gnu.org http://lists.gnu.org/mailman/listinfo/commit-mailutils