From 5c24b7f058c0ae317beda219780952f09af0396d Mon Sep 17 00:00:00 2001 From: Craig Fields Date: Fri, 11 Nov 1994 23:57:33 +0000 Subject: Picked up from p4a. --- clients/zmailnotify/zmailnotify.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'clients') diff --git a/clients/zmailnotify/zmailnotify.c b/clients/zmailnotify/zmailnotify.c index f398630..7c5a746 100644 --- a/clients/zmailnotify/zmailnotify.c +++ b/clients/zmailnotify/zmailnotify.c @@ -97,6 +97,8 @@ main(argc, argv) if (!dir) dir = pwd->pw_dir; } + if (argc > 1) + user = argv[1]; (void) sprintf(lockfile,"%s/.maillock",dir); @@ -391,6 +393,7 @@ char *host; KTEXT ticket = (KTEXT)NULL; int rem; long authopts; + char *host_save; #endif char *get_errmsg(); char *svc_name; @@ -449,10 +452,17 @@ char *host; #else authopts = 0L; #endif - rem = krb_sendauth(authopts, s, ticket, "pop", hp->h_name, (char *)0, + host_save = malloc(strlen(hp->h_name) + 1); + if (!host_save) { + sprintf(Errmsg, "Out of memory."); + return(NOTOK); + } + strcpy(host_save, hp->h_name); + rem = krb_sendauth(authopts, s, ticket, "pop", host_save, (char *)0, 0, (MSG_DAT *) 0, (CREDENTIALS *) 0, (bit_64 *) 0, (struct sockaddr_in *)0, (struct sockaddr_in *)0,"ZMAIL0.0"); + free(host_save); free(ticket); if (rem != KSUCCESS) { (void) sprintf(Errmsg, "kerberos error: %s",krb_err_txt[rem]); -- cgit v1.2.3