[PATCH] implementation of getpeereid() for Solaris

Jan Pechanec Jan.Pechanec at Sun.COM
Tue Sep 26 23:51:06 EST 2006


On Tue, 26 Sep 2006, Darren Tucker wrote:

> Jan Pechanec wrote:
>> 	hi, Solaris doesn't have getpeereid() or SO_PEERCRED. However,
>> getpeerucred() is perfectly usable for that; and it's in Solaris 10 and
>> OpenSolaris.  [...]
>> 	[patch] which implements getpeereid() function in OpenSSH with
>> getpeerucred() in case that ucred.h and getpeerucred() are present.
>
> Thanks.
>
> We will probably apply this (with a couple of minor tweaks, like moving the
> #include into bsd-getpeereid.c) but unfortunately it arrived too late for
> 4.4p1, so it will not be until the following release.

	cool. I think there are some minor problems I found in other 
regression tests, I will send patch, too.

>
>> -rm -f ${OBJ}/agent
>> +rm -f $ASOCK
>
> Out of curiosity, why this change?

	there is "ASOCK=${OBJ}/agent" on line 7. Just from good programming 
practise I would expect that by changing contents of ASOCK variable I'm done 
if I want to change that socket name. However, the contents ${OBJ}/agent is 
used somewhere else literally. It's just a suggestion, code would be 
cleaner.

	cheers, Jan.

-- 
Jan Pechanec



More information about the openssh-unix-dev mailing list