Bug 1421 - Missing error condition in auth_rhosts.c
Missing error condition in auth_rhosts.c
Status: RESOLVED WONTFIX
Product: Samba 3.0
Classification: Unclassified
Component: User/Group Accounts
3.0.4
All Linux
: P3 normal
: none
Assigned To: Gerald (Jerry) Carter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-06-02 18:16 UTC by Anthony Heading
Modified: 2006-04-08 22:45 UTC (History)
1 user (show)

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-02 18:16:50 UTC
Hi,
    I was getting a null pointer dereference in smb - I believe this patch 
fixes the problem. 

Anthony


--- samba-3.0.4/source/auth/auth_rhosts.c.Orig  2004-06-02 20:41:59.000000000 -
0400
+++ samba-3.0.4/source/auth/auth_rhosts.c       2004-06-02 20:42:23.000000000 -
0400
@@ -227,6 +227,7 @@
                        nt_status = make_server_info_sam(server_info, account);
                } else {
                        pdb_free_sam(&account);
+                       nt_status = NT_STATUS_NOT_IMPLEMENTED;
                }
                unbecome_root();
        } else {
Comment 1 Gerald (Jerry) Carter 2004-07-21 14:04:05 UTC
is NOT_IMPLEMENTED the right error ?  If you have said to 
use rhosts and no .rhosts exists, wouldn't you want to 
treat that as if the authentication failed ?
Comment 2 Anthony Heading 2004-07-22 10:50:29 UTC
(In reply to comment #1)
> is NOT_IMPLEMENTED the right error ?  If you have said to 
> use rhosts and no .rhosts exists, wouldn't you want to 
> treat that as if the authentication failed ?

Using NOT_IMPLEMENTED is consistent with the other
no-match code paths in the file.  (e.g. .rhosts existing
but being empty, hosts.equiv not existing, and so on).
And if you say to use rhosts and no .rhosts exist,
that should be perfectly fine - it should just fall
through to whatever would happen if it was not
configured to know about rhosts)
Comment 3 Gerald (Jerry) Carter 2006-04-08 22:45:57 UTC
I'm pulling rhosts in 3.0.23