aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-05-25 20:10:50 +0000
committerRichard M. Stallman1998-05-25 20:10:50 +0000
commit0d66b6f3328bb46bcf31610edb8b33dca53797ef (patch)
treeb603f1a6310c7f48802151f3b412071124fcab31
parent7e824765ca6a3c3d3fb3b9bcf17fc74cc07df8b4 (diff)
downloademacs-0d66b6f3328bb46bcf31610edb8b33dca53797ef.tar.gz
emacs-0d66b6f3328bb46bcf31610edb8b33dca53797ef.zip
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.
-rw-r--r--lib-src/movemail.c45
1 files changed, 8 insertions, 37 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index cb374982303..8746cb4bfb6 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -197,43 +197,16 @@ main (argc, argv)
197 char *spool_name; 197 char *spool_name;
198#endif 198#endif
199 199
200#ifdef MAIL_USE_POP
201 int pop_flags = POP_NO_GETPASS | POP_NO_GSSAPI;
202# define ARGSTR "gkp"
203#else /* ! MAIL_USE_POP */
204# define ARGSTR "p"
205#endif /* MAIL_USE_POP */
206
207 delete_lockname = 0; 200 delete_lockname = 0;
208 201
209 /* 202 while ((c = getopt (argc, argv, "p")) != EOF)
210 'g' enables Kerberos and disables GSS-API.
211 'k' enables GSS-API and disables Kerberos.
212
213 By default, Kerberos is enabled (if it is compiled in) and
214 GSS-API is disabled, i.e., "-k" is the default. However, I'm
215 putting the flag in anyway, in case we decide to add new
216 authentication methods or change the default later.
217 */
218
219 while ((c = getopt (argc, argv, ARGSTR)) != EOF)
220 { 203 {
221 switch (c) { 204 switch (c) {
222#ifdef MAIL_USE_POP
223 case 'g':
224 pop_flags |= POP_NO_KERBEROS;
225 pop_flags &= ~POP_NO_GSSAPI;
226 break;
227 case 'k':
228 pop_flags |= POP_NO_GSSAPI;
229 pop_flags &= ~POP_NO_KERBEROS;
230 break;
231#endif
232 case 'p': 205 case 'p':
233 preserve_mail++; 206 preserve_mail++;
234 break; 207 break;
235 default: 208 default:
236 goto usage; 209 exit(1);
237 } 210 }
238 } 211 }
239 212
@@ -245,12 +218,11 @@ main (argc, argv)
245#endif 218#endif
246 ) 219 )
247 { 220 {
248 usage: 221 fprintf (stderr, "Usage: movemail [-p] inbox destfile%s\n",
249 fprintf (stderr, "Usage: movemail %s[-p] inbox destfile%s\n",
250#ifdef MAIL_USE_POP 222#ifdef MAIL_USE_POP
251 "[-g|-k] ", " [POP-password]" 223 " [POP-password]"
252#else 224#else
253 "", "" 225 ""
254#endif 226#endif
255 ); 227 );
256 exit (1); 228 exit (1);
@@ -291,7 +263,7 @@ main (argc, argv)
291 int status; 263 int status;
292 264
293 status = popmail (inname + 3, outname, preserve_mail, 265 status = popmail (inname + 3, outname, preserve_mail,
294 (argc - optind == 3) ? argv[optind+2] : NULL, pop_flags); 266 (argc - optind == 3) ? argv[optind+2] : NULL);
295 exit (status); 267 exit (status);
296 } 268 }
297 269
@@ -710,12 +682,11 @@ char ibuffer[BUFSIZ];
710char obuffer[BUFSIZ]; 682char obuffer[BUFSIZ];
711char Errmsg[80]; 683char Errmsg[80];
712 684
713popmail (user, outfile, preserve, password, flags) 685popmail (user, outfile, preserve, password)
714 char *user; 686 char *user;
715 char *outfile; 687 char *outfile;
716 int preserve; 688 int preserve;
717 char *password; 689 char *password;
718 int flags;
719{ 690{
720 int nmsgs, nbytes; 691 int nmsgs, nbytes;
721 register int i; 692 register int i;
@@ -724,7 +695,7 @@ popmail (user, outfile, preserve, password, flags)
724 char *getenv (); 695 char *getenv ();
725 popserver server; 696 popserver server;
726 697
727 server = pop_open (0, user, password, flags); 698 server = pop_open (0, user, password, POP_NO_GETPASS);
728 if (! server) 699 if (! server)
729 { 700 {
730 error (pop_error); 701 error (pop_error);