openbsd-ports/mail/dspam/patches/patch-src_agent_shared_c
todd 8779cd4b60 o update to dspam 3.8.0 mostly from brad@
o fix dspamc that was busted in the 3.8.0 release, verified to work via testing
2007-12-21 14:42:23 +00:00

23 lines
501 B
Plaintext

$OpenBSD: patch-src_agent_shared_c,v 1.3 2007/12/21 14:42:23 todd Exp $
--- src/agent_shared.c.orig Thu Dec 20 18:03:30 2007
+++ src/agent_shared.c Thu Dec 20 18:03:08 2007
@@ -913,3 +913,18 @@ int process_parseto(AGENT_CTX *ATX, const char *buf) {
return 0;
}
+
+int
+init_pwent_cache()
+{
+ struct passwd *pwent;
+ pwent = getpwuid(getuid());
+ if (pwent == NULL) {
+ return 0;
+ }
+ else {
+ __pw_name = strdup(pwent->pw_name);
+ __pw_uid = pwent->pw_uid;
+ }
+ return 1;
+}