FreeBSD Bugzilla – Attachment 79638 Details for
Bug 114375
[patch] news/nn 6.7.3 From: header broken when posting via nntp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.58 KB, created by
G. Paul Ziemba
on 2007-07-07 09:20:03 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
G. Paul Ziemba
Created:
2007-07-07 09:20:03 UTC
Size:
1.58 KB
patch
obsolete
>--- patch-an.orig Sat Jul 7 00:48:41 2007 >+++ patch-an Sat Jul 7 00:34:32 2007 >@@ -1,5 +1,5 @@ >---- nntp.c.orig Tue Apr 19 18:06:51 2005 >-+++ nntp.c Sat Sep 3 14:34:49 2005 >+--- nntp.c.orig Tue Apr 19 16:06:51 2005 >++++ nntp.c Sat Jul 7 00:30:15 2007 > @@ -76,6 +76,7 @@ > static int connect_server(void); > static void debug_msg(char *prefix, char *str); >@@ -59,31 +59,28 @@ > /* > * get_server_line: get a line from the server. > * >-@@ -1492,15 +1537,24 @@ >- gen_frompath(void) >- { >- struct passwd *passwd; >-+ char *domain; >-+ const char *fromFormat = "From: <%s@%s>\r\n"; >+@@ -848,6 +893,16 @@ > >- passwd = getpwuid(getuid()); >+ #else /* DOMAIN */ > >- fprintf(nntp_out, "From: "); >- fprintf(nntp_out, "%s ", full_name()); >- >-- fprintf(nntp_out, "<%s@%s>\r\n", >-- passwd->pw_name, >-- domain); >-+ domain = find_domain(DOMAIN_FILE); >-+ if (domain == NULL) { >-+ fprintf(nntp_out, fromFormat, >-+ passwd->pw_name, >-+ host_name); >-+ } else { >-+ fprintf(nntp_out, fromFormat, >-+ passwd->pw_name, >-+ domain); >++ /* >++ * if domain is defined in DOMAIN_FILE, use it >++ */ >++ cp = find_domain(DOMAIN_FILE); >++ if (cp) { >++ strncpy(domain, cp, MAXHOSTNAMELEN); >++ domain[MAXHOSTNAMELEN-1] = 0; /* ensure nul-terminated */ >++ return; > + } >++ >+ domain[0] = '\0'; > >- #ifdef HIDDENNET >- /* Only the login name - nntp server will add uucp name */ >+ cp = index(host_name, '.'); >+@@ -882,6 +937,7 @@ >+ #endif >+ } >+ #endif /* DOMAIN */ >++ domain[MAXHOSTNAMELEN-1] = 0; /* ensure nul-terminated */ >+ } >+ >+ /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 114375
: 79638