Patches for compiling / using portable OpenSSH on FreeMiNT?
Chris Adams
cmadams at hiwaay.net
Tue Jun 11 01:31:27 EST 2002
Once upon a time, James A Morrison <ja2morri at student.math.uwaterloo.ca> said:
> Looking at the error descriptions, in the glibc manual, it seems ENOTSUP would
> be a better error to return for setrlimit(RLIMIT_CORE). I think that ssh
> should work on systems that return ENOSYS or ENOTSUP, or those systems should
> be fixed so that setrlimit works. Usually EINVAL is used when programs pass
> invalid arguments to a function, so I don't think we should ever overlook a
> EINVAL error.
According to the Single Unix Specification:
The getrlimit() and setrlimit() functions will fail if:
[EINVAL]
An invalid resource was specified; or in a setrlimit() call,
the new rlim_cur exceeds the new rlim_max.
[EPERM]
The limit specified to setrlimit() would have raised the
maximum limit value, and the calling process does not have
appropriate privileges.
The setrlimit() function may fail if:
[EINVAL]
The limit specified cannot be lowered because current usage is
already higher than the limit.
So, EINVAL is the correct error to return if an unsupported resource is
specified.
--
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
More information about the openssh-unix-dev
mailing list