summaryrefslogtreecommitdiff
path: root/lib-src/movemail.c
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace changes.Juanma Barranquero2011-09-091-2/+2
|
* * movemail.c (main): Do not use sprintf when its result might not fitPaul Eggert2011-08-281-4/+3
| | | | | in 'int'. Instead, put the possibly-long file name into the output of pfatal_with_name.
* Assume freestanding C89 headers, string.h, stdlib.h.Paul Eggert2011-07-061-2/+0
|
* * movemail.c: Fix race condition and related bugs (Bug#8836).Paul Eggert2011-06-101-11/+24
| | | | | | | | | (main) [!MAIL_USE_SYSTEM_LOCK]: Prefer mkstemp to mktemp, as this fixes some race conditions. Report mkstemp/mktemp errno rather than a possibly-garbage errno. Reinitialize the template each time through the loop, as earlier mkstemp/mktemp calls could have trashed it. Pass 0600 (not 0666) to mktemp, for consistency with mkstemp; the permissions don't matter anyway.
* * movemail.c (mail_spool_name): Protoize.Paul Eggert2011-04-161-6/+14
| | | | | (main): Remove unused var. Mark var as initialized. Move locals to avoid shadowing, and use time_t for times.
* * movemail.c: Define macros only in needed contexts.Paul Eggert2011-02-211-0/+13
|
* * movemail.c (popmail): Report fchown failure instead of ignoring it.Paul Eggert2011-02-211-1/+12
| | | | But if the file already has the right ownership, don't worry about it.
* * movemail.c: (DIRECTORY_SEP, IS_DIRECTORY_SEP, DONE, IS_FROM_LINE):Paul Eggert2011-02-211-15/+0
| | | | | | Remove unused macros. * pop.c (index): Remove unused macro. (KPOP_PORT): Define only if KERBEROS is defined.
* * movemail.c: Remove unused varsPaul Eggert2011-02-211-5/+0
|
* * movemail.c (main, pop_retr): Rename locals to avoid shadowing.Paul Eggert2011-02-211-11/+11
|
* Declare file-scope functions and variables static if not exported.Paul Eggert2011-02-211-7/+7
| | | | | | | | This is more consistent, and is nicer with gcc -Wstrict-prototypes. * ebrowse.c, emacsclient.c, fakemail.c, make-docfile.c, movemail.c: * profile.c, test-distrib.c, update-game-score.c: Declare non-'main' functions and variables to be static. * ebrowse.c: Omit redundant function prototypes.
* Refill some long/short copyright headers.Glenn Morris2011-01-261-1/+3
|
* Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-2/+1
|
* Merge from emacs-23.Glenn Morris2011-01-241-4/+4
|\ | | | | | | Note setting of CANNOT_DUMP on ia64 hpux is still to be merged manually.
| * * movemail.c (main): Use setregid, as setegid is missing on HP-UX (Bug#6811).Chong Yidong2011-01-231-4/+4
| | | | | | | | Suggested by Peter O'Gorman.
* | Check return values of some library calls.Paul Eggert2011-01-221-1/+2
| |
* | Merge from mainline.Paul Eggert2011-01-171-2/+0
|\ \
| * | Nuke arch-tags.Glenn Morris2011-01-151-2/+0
| | |
* | | Merge from mainline.Paul Eggert2011-01-141-1/+1
|\| |
| * | Merge from emacs-23Stefan Monnier2011-01-141-1/+1
| |\|
| | * Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-021-1/+1
| | |
| | * Fix permissions handling (CVE-2010-0825).Chong Yidong2010-04-021-26/+19
| | | | | | | | | | | | | | | | | | * movemail.c (main): Check return values of setuid. Avoid possibility of symlink attack when movemail is setgid mail (CVE-2010-0825).
* | | Include <unistd.h> unilaterally.Paul Eggert2011-01-091-2/+0
|/ /
* | Fix compilation warnings.Dan Nicolaescu2010-10-031-4/+3
| | | | | | | | | | | | | | | | | | | | * lib-src/test-distrib.c (cool_read): * lib-src/movemail.c (main, concat): * lib-src/make-docfile.c (scan_file, write_c_args): * emacsclient.c (get_server_config): Fix -Wconversion warning. (egetenv): Move conditional definition earlier. (progname): Use const. * lib-src/sorted-doc.c (xstrdup): Use const.
* | Fix warnings produced by compiling with -Wwrite_strings (i.e. use const char *).Jan D2010-08-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * b2m.c (concat, fatal): Use const char*. (main): Don't assign labels a string literal. * ebrowse.c (struct member): filename, def_filename is const. (struct sym): filename, sfilename is const. (struct kw): name is const. (add_sym, yyerror, token_string, insert_keyword, main): Use const char*. * emacsclient.c (message, sock_err_message, send_to_emacs) (quote_argument, set_local_socket) (start_daemon_and_retry_set_socket): Use const char*. * etags.c (compressor, language, Ada_suffix, Ada_help, Asm_suffixes) (Asm_help, default_C_suffixes, default_C_help, Cplusplus_suffixes) (Cplusplus_help, Cjava_suffixes, Cobol_suffixes, Cstar_suffixes) (Erlang_suffixes, Erlang_help, Forth_suffixes, Forth_help) (Fortran_suffixes, Fortran_help, HTML_suffixes, HTML_help) (Lisp_suffixes, Lisp_help, Lua_suffixes, Lua_help) (Makefile_filenames, Makefile_help, Objc_suffixes, Objc_help) (Pascal_suffixes, Pascal_help, Perl_suffixes, Perl_interpreters) (Perl_help, PHP_suffixes, PHP_help, plain_C_suffixses, PS_suffixes) (PS_help, Prolog_suffixes, Prolog_help, Python_suffixes, Python_help) (Scheme_suffixes, Scheme_help, TeX_suffixes, TeX_help, Texinfo_suffixes) (Texinfo_help, Yacc_suffixes, Yacc_help, auto_help, none_help) (no_lang_help, print_language_names) (get_language_from_interpreter, get_language_from_filename) (init, make_tag, struct C_stab_entry, write_classname, TEX_defenv) (TEX_decode_env, nocase_tail, savestr, savenstr, fatal, pfatal) (concat): Use const char*. * make-docfile.c (error, fatal, scan_c_file, scan_lisp_file): Use const char *. * movemail.c (fatal, error, concat): Use const char *. * pop.c (pop_multi_first, socket_connection, sendline): Use conat char*. * pop.h (pop_multi_first): Use const char *. (_ARGS): Remove. * sorted-doc.c (error, fatal, states): Use const char *. * update-game-score.c (get_prefix, write_scores, main): Use const char*.
* | Add NO_RETURN specifiers to functions in lib-src.Dan Nicolaescu2010-07-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | * lib-src/update-game-score.c (usage): Add NO_RETURN specifier. * lib-src/movemail.c (fatal, pfatal_with_name, pfatal_and_delete): * lib-src/make-docfile.c (fatal): * lib-src/hexl.c (usage): * lib-src/fakemail.c (fatal): * lib-src/etags.c (fatal, suggest_asking_for_help, pfatal): * lib-src/emacsclient.c (fatal): * lib-src/b2m.c (fatal): Likewise.
* | Use strchr, strrchr instead of index, rindexAndreas Schwab2010-07-111-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * callint.c (Fcall_interactively): Use strchr, strrchr instead of index, rindex. * doc.c (get_doc_string, Fsnarf_documentation): Likewise. * editfns.c (Fuser_full_name, Fformat): Likewise. * emacs.c (argmatch, sort_args, decode_env_path): Likewise. * fileio.c (Ffile_symlink_p): Likewise. * filelock.c (current_lock_owner): Likewise. * font.c (font_parse_name, font_parse_family_registry): Likewise. * fontset.c (fontset_pattern_regexp): Likewise. * lread.c (read1): Likewise. * sysdep.c (init_system_name): Likewise. * xfns.c (select_visual): Likewise. * s/hpux10-20.h (index, rindex): Don't define. * s/ms-w32.h (index): Likewise. * s/usg5-4.h: Likewise. * sed2v2.inp (HAVE_INDEX, HAVE_RINDEX): Don't edit. (HAVE_STRCHR, HAVE_STRRCHR): Edit to 1. * emacsclient.c (set_local_socket): Use strchr, strrchr instead of index, rindex. * movemail.c (mail_spool_name, popmail): Likewise. * pop.c (pop_list): Likewise. * CPP-DEFINES (HAVE_INDEX, HAVE_RINDEX): Remove. * configure.in: Don't check for index and rindex, check for strchr and strrchr. Define strchr and strrchr as index and rindex, resp., in src/config.h if not available.
* | Clean up movemail sourceAndreas Schwab2010-07-061-23/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * movemail.c: Add MAIL_USE_POP around prototypes. Include <string.h> if HAVE_STRING_H. (strerror): Only declare if !HAVE_STRERROR. (fatal): Make static. (error): Likewise. (pfatal_with_name): Likewise. (pfatal_and_delete). Likewise. (concat): Likewise. (xmalloc): Likewise. (popmail): Likewise. (pop_retr): Likewise. (mbx_write): Likewise. (mbx_delimit_begin): Likewise. (mbx_delimit_end): Likewise.
* | * movemail.c: Add MAIL_USE_POP around prototypes.Andreas Schwab2010-07-061-0/+2
| |
* | Convert function definitions to standard C.Dan Nicolaescu2010-07-021-47/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/update-game-score.c: Convert function definitions to standard C. * lib-src/sorted-doc.c: * lib-src/profile.c: * lib-src/pop.c: * lib-src/movemail.c: * lib-src/make-docfile.c: * lib-src/hexl.c: * lib-src/fakemail.c: * lib-src/etags.c: * lib-src/ebrowse.c: * lib-src/digest-doc.c: * lib-src/b2m.c: Likewise.
* | Remove __P and P_ from .c and .m files and definition of P_Jan D2010-07-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp.h: * atimer.h: Remove define for P_. * alloc.c: Remove __P and P_ from .c and .m files. * atimer.c: * buffer.c: * callint.c: * category.c: * charset.c: * chartab.c: * cm.c: * coding.c: * composite.c: * data.c: * dired.c: * dispnew.c: * doc.c: * editfns.c: * emacs.c: * eval.c: * fileio.c: * filelock.c: * fns.c: * font.c: * fontset.c: * frame.c: * ftfont.c: * ftxfont.c: * gmalloc.c: * gtkutil.c: * image.c: * indent.c: * intervals.c: * keyboard.c: * keymap.c: * lread.c: * marker.c: * menu.c: * minibuf.c: * print.c: * process.c: * scroll.c: * search.c: * sound.c: * strftime.c: * syntax.c: * sysdep.c: * term.c: * terminal.c: * textprop.c: * unexalpha.c: * w32console.c: * w32fns.c: * w32font.c: * w32menu.c: * w32term.c: * w32uniscribe.c: * window.c: * xdisp.c: * xfaces.c: * xfns.c: * xfont.c: * xftfont.c: * xmenu.c: * xselect.c: * xterm.c: Likewise. * ebrowse.c: Remove P_ and __P. * etags.c: * movemail.c: * pop.c: * update-game-score.c: Likewise.
* | lib-src/movemail.c (error): Avoid warning when there are no args.Juanma Barranquero2010-06-241-1/+1
| |
* | Fix permissions handling (CVE-2010-0825).Chong Yidong2010-04-021-26/+19
| | | | | | | | | | | | * movemail.c (main): Check return values of setuid. Avoid possibility of symlink attack when movemail is setgid mail (CVE-2010-0825).
* | Remove extern errno declarations.Dan Nicolaescu2010-04-011-3/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | * xterm.c: * xrdb.c: * w32term.c: * unexec.c: * unexaix.c: * sysdep.c: * process.c: * lread.c: * keyboard.c: * floatfns.c: * filelock.c: * fileio.c: * emacs.c (main): * ecrt0.c: * dispnew.c: * callproc.c: * buffer.c: Remove errno extern declarations. * s/netbsd.h (NEED_ERRNO): Remove. * movemail.c: * etags.c: * emacsclient.c: Remove extern errno declarations.
* Add 2010 to copyright years.Glenn Morris2010-01-131-1/+1
|
* (main) [MAIL_USE_POP]: Add -r to usage message.Glenn Morris2009-03-041-1/+1
|
* Include time.h unconditionally.Chong Yidong2009-02-131-2/+2
| | | | (main): Use time_t for time variables.
* (mbx_delimit_begin): Also write the current time.Glenn Morris2009-02-111-1/+12
|
* (mbx_delimit_begin, mbx_delimit_end): Write mbox rather than BabylGlenn Morris2009-02-101-2/+2
| | | | format. (Bug#2196)
* Add 2009 to copyright years.Glenn Morris2009-01-081-1/+1
|
* (main): Fatal if hard links cannot be created.Chong Yidong2009-01-011-0/+7
|
* * syswait.h: Remove old if 0 code. Do not define WAITTYPE, it wasDan Nicolaescu2008-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | always defined as int. * s/netbsd.h (HAVE_UNION_WAIT, HAVE_WAIT_HEADER, WAIT_USE_INT): * s/gnu.h (HAVE_WAIT_HEADER, WAIT_USE_INT, HAVE_UNION_WAIT): * s/gnu-linux.h (HAVE_WAIT_HEADER): * s/freebsd.h (HAVE_WAIT_HEADER): * s/bsd-common.h (HAVE_UNION_WAIT): * s/aix4-2.h (HAVE_WAIT_HEADER): * m/mips.h (HAVE_UNION_WAIT): * s/usg5-4.h (HAVE_WAIT_HEADER, WAITTYPE): Do not define, not used. (COFF, static): Do not define, they are undefined later in the file. * process.c (update_status): Don't use a union. (status_convert): (sigchld_handler): Use int instead of WAITTYPE. * movemail.c (main): Use int instead of WAITTYPE.
* Switch to recommended form of GPLv3 permissions notice.Glenn Morris2008-05-091-6/+5
|
* * configure.in: Remove references to obsolete variables andDan Nicolaescu2008-02-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | systems. * configure: Regenerate. * Makefile.in (NO_SHORTNAMES): * emacsclient.c (NO_SHORTNAMES): * fakemail.c (NO_SHORTNAMES): * make-docfile.c (NO_SHORTNAMES): * movemail.c (NO_SHORTNAMES): * pop.c (NO_SHORTNAMES): Remove references to obsolete variable. * config.nt (SHORTNAMES): Remove reference to obsolete variable. * s/vms4-0.h: * s/vms4-2.h: * s/vms4-4.h: * s/vms5-5.h: Remove, unused. * s/irix5-2.h: * s/irix6-0.h: * s/riscos5.h: * s/mach-bsd4-3.h: * m/mips4.h: Remove files for obsolete systems * Makefile.in: * filelock.c: * unexmips.c: * m/hp9000s300.h: * m/iris4d.h: * s/aix3-1.h: * s/hpux.h: * s/msdos.h: * s/usg5-0.h: * s/usg5-2-2.h: * s/usg5-2.h: * s/usg5-3.h: Remove references to obsolete variables. * s/irix5-0.h: Remove, move all the contents ... * s/irix6-5.h: ... here. Simplify. * config.in: Regenerate.
* Merge from emacs--rel--22Miles Bader2008-02-241-1/+1
|\ | | | | | | Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1074
| * *** empty log message ***Juanma Barranquero2008-02-051-1/+1
| |
* | * movemail.c: Remove references to XENIX.Dan Nicolaescu2008-01-181-7/+3
| | | | | | | | * m/intel386.h: Remove references to XENIX.
* | * movemail.c:Dan Nicolaescu2008-01-131-6/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | * make-docfile.c: Remove reference to symbols defined by systems not supported anymore: MAC_OS8, XENIX and STRIDE. * (src/m/mips.h): * (src/m/intel386.h): * callproc.c: * config.in: * ecrt0.c: * emacs.c: * fileio.c: * frame.c: * getpagesize.h: * keyboard.c: * lread.c: * process.c: * puresize.h: * sysdep.c: * systty.h: * syswait.h: * unexec.c: * xdisp.c: * alloc.c: Remove code containing references to symbols defined by unsupported systems.
* Add 2008 to copyright years.Glenn Morris2008-01-071-1/+1
|
* Switch license to GPLv3 or later.Glenn Morris2007-07-251-1/+1
|