Hello,
Attached is a patch to add support for an "include" file in ssh
configs. It is
written against openssh-5.2p1.
## ~/.ssh/config
Include ~/.ssh/config.contrib
## end
- Leading ~/ expands to $HOME according to getpwuid_r?.
- Leading ~username expands to $HOME for username according to getpwnam_r.
- Fallbacks to /home/$USER are implemented for when struct passwd.pw_dir is
NULL? after these calls.
Files are parsed immediately in place and bad option counts are unique to each
file. In this implementation, files that cannot be opened are error()d and ssh
exits.
There is rough documentation added to ssh_config.5. I haven't tested if the
markup is correct as I don't know nroff.
? Note that I have used FOO_r functions. I will rewrite the patch if this does
not fit your portability requirements or threads are not an issue or some
such.
? I've never heard of this happening...
--
Gavin Beatty
SEMPER UBI SUB UBI
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openssh-include.patch
Type: text/x-patch
Size: 5916 bytes
Desc: not available
Url :
http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20090324/d3fed9d9/attachment.bin