You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-mail/relay-ctrl/files/authenticated.c-relayfixup....

29 lines
702 B

diff -ur relay-ctrl-3.1.1/authenticated.c relay-ctrl-3.1.1-r2/authenticated.c
--- relay-ctrl-3.1.1/authenticated.c 2002-04-26 09:07:38.000000000 -0700
+++ relay-ctrl-3.1.1-r2/authenticated.c 2004-05-24 02:31:47.000000000 -0700
@@ -1,14 +1,20 @@
#include <stdlib.h>
+#include <string.h>
#include "relay-ctrl.h"
int is_authenticated(void)
{
if (getenv("AUTHUSER") && getenv("AUTHARGV0")) {
/* Courier IMAP or POP3 */
- if (getenv("AUTHENTICATED"))
- return 1;
- }
- else
+ char *authenticated = getenv("AUTHENTICATED");
+ if (authenticated && strlen(authenticated)) {
+ return 1;
+ } else {
+ return 0;
+ }
+ } else {
return 1;
+ }
+ // unreachable code
return 0;
}