[Bug 543] sshd does not use AIX's setauthdb

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Wed Apr 16 14:28:53 EST 2003


http://bugzilla.mindrot.org/show_bug.cgi?id=543





------- Additional Comments From dtucker at zip.com.au  2003-04-16 14:28 -------
Created an attachment (id=270)
 --> (http://bugzilla.mindrot.org/attachment.cgi?id=270&action=view)
Untested patch containing discussed changes.

I can't find much documentation on setauthdb (no man pages, only a couple of
references on Google) but from what I can gather it loads some authentication
code at runtime somewhat like PAM.

A few things on the patch:

1) setauthdb is not on AIX 4.2 so you patch breaks there.  You can add a test
to configure.ac and put your additions inside "#ifdef HAVE_SETAUTHDB".

2) the indentation in the "if (authenticated.." block is misleading.  You also
have a whitespace-only change.

3) I'd move the variables you need inside the "if (authenticated.." block. 
That will remove one #ifdef.

4) Is 16 an absolute maximum for S_REGISTRY?  You should probably use
sizeof(registry) instead of a magic number in the strncpy.  Do you even need
the char *tmp and strncpy?  Does setauthdb allocate oldauthdb for you (many of
those functions do).

5) Do you need to explicitly set "files" in the case where getuserattr fails? 
Would you be better off just skipping the setauthdb in that case (which is
equivalent to the old behaviour)?

FWIW, I'd like to see all of this code moved out of the mainline and into a
compatibility function (see
http://marc.theaimsgroup.com/?l=openssh-unix-dev&m=104936325924401).



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




More information about the openssh-unix-dev mailing list