Bug 1425 - rhosts file parsing \n confusion
Summary: rhosts file parsing \n confusion
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: User/Group Accounts (show other bugs)
Version: 3.0.4
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Gerald (Jerry) Carter
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-03 18:07 UTC by Anthony Heading
Modified: 2006-04-08 22:45 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Heading 2004-06-03 18:07:04 UTC
I think I reported this bug back in the samba 2.2 days,  but I notice it hasn't
been fixed.

The rhosts files have for the past few years already had '\n' line
terminators stripped by the input routines, but the parsing code
hasn't been updated to match.


--- samba-3.0.4/source/auth/auth_rhosts.c.Orig  2004-06-03 20:56:39.000000000 -0400
+++ samba-3.0.4/source/auth/auth_rhosts.c       2004-06-03 20:56:21.000000000 -0400
@@ -42,7 +42,7 @@
     char *buf = lines[i];
     trim_char(buf,' ',' ');
 
-    if (buf[0] != '#' && buf[0] != '\n') 
+    if (buf[0] != '#' && buf[0] != '\0') 
     {
       BOOL is_group = False;
       int plus = 1;
@@ -56,7 +56,7 @@
        if (buf[0] == '+') 
        {
          bp++;
-         if (*bp == '\n' && plus_allowed) 
+         if (*bp == '\0' && plus_allowed) 
          {
            /* a bare plus means everbody allowed */
            DEBUG(6, ("check_user_equiv everybody allowed\n"));
Comment 1 Gerald (Jerry) Carter 2004-07-21 14:05:28 UTC
taking this one over
Comment 2 Gerald (Jerry) Carter 2006-04-08 22:45:36 UTC
I'm pulling rhosts in 3.0.23