mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Undo this previous change:
[MAIL_USE_POP]: Add support for "-g" and "-k" command-line flags to tell movemail to use GSS-API or Kerberos authentication if they are supported.
This commit is contained in:
parent
7e824765ca
commit
0d66b6f332
1 changed files with 8 additions and 37 deletions
|
|
@ -197,43 +197,16 @@ main (argc, argv)
|
|||
char *spool_name;
|
||||
#endif
|
||||
|
||||
#ifdef MAIL_USE_POP
|
||||
int pop_flags = POP_NO_GETPASS | POP_NO_GSSAPI;
|
||||
# define ARGSTR "gkp"
|
||||
#else /* ! MAIL_USE_POP */
|
||||
# define ARGSTR "p"
|
||||
#endif /* MAIL_USE_POP */
|
||||
|
||||
delete_lockname = 0;
|
||||
|
||||
/*
|
||||
'g' enables Kerberos and disables GSS-API.
|
||||
'k' enables GSS-API and disables Kerberos.
|
||||
|
||||
By default, Kerberos is enabled (if it is compiled in) and
|
||||
GSS-API is disabled, i.e., "-k" is the default. However, I'm
|
||||
putting the flag in anyway, in case we decide to add new
|
||||
authentication methods or change the default later.
|
||||
*/
|
||||
|
||||
while ((c = getopt (argc, argv, ARGSTR)) != EOF)
|
||||
while ((c = getopt (argc, argv, "p")) != EOF)
|
||||
{
|
||||
switch (c) {
|
||||
#ifdef MAIL_USE_POP
|
||||
case 'g':
|
||||
pop_flags |= POP_NO_KERBEROS;
|
||||
pop_flags &= ~POP_NO_GSSAPI;
|
||||
break;
|
||||
case 'k':
|
||||
pop_flags |= POP_NO_GSSAPI;
|
||||
pop_flags &= ~POP_NO_KERBEROS;
|
||||
break;
|
||||
#endif
|
||||
case 'p':
|
||||
preserve_mail++;
|
||||
break;
|
||||
default:
|
||||
goto usage;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -245,12 +218,11 @@ main (argc, argv)
|
|||
#endif
|
||||
)
|
||||
{
|
||||
usage:
|
||||
fprintf (stderr, "Usage: movemail %s[-p] inbox destfile%s\n",
|
||||
fprintf (stderr, "Usage: movemail [-p] inbox destfile%s\n",
|
||||
#ifdef MAIL_USE_POP
|
||||
"[-g|-k] ", " [POP-password]"
|
||||
" [POP-password]"
|
||||
#else
|
||||
"", ""
|
||||
""
|
||||
#endif
|
||||
);
|
||||
exit (1);
|
||||
|
|
@ -291,7 +263,7 @@ main (argc, argv)
|
|||
int status;
|
||||
|
||||
status = popmail (inname + 3, outname, preserve_mail,
|
||||
(argc - optind == 3) ? argv[optind+2] : NULL, pop_flags);
|
||||
(argc - optind == 3) ? argv[optind+2] : NULL);
|
||||
exit (status);
|
||||
}
|
||||
|
||||
|
|
@ -710,12 +682,11 @@ char ibuffer[BUFSIZ];
|
|||
char obuffer[BUFSIZ];
|
||||
char Errmsg[80];
|
||||
|
||||
popmail (user, outfile, preserve, password, flags)
|
||||
popmail (user, outfile, preserve, password)
|
||||
char *user;
|
||||
char *outfile;
|
||||
int preserve;
|
||||
char *password;
|
||||
int flags;
|
||||
{
|
||||
int nmsgs, nbytes;
|
||||
register int i;
|
||||
|
|
@ -724,7 +695,7 @@ popmail (user, outfile, preserve, password, flags)
|
|||
char *getenv ();
|
||||
popserver server;
|
||||
|
||||
server = pop_open (0, user, password, flags);
|
||||
server = pop_open (0, user, password, POP_NO_GETPASS);
|
||||
if (! server)
|
||||
{
|
||||
error (pop_error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue