hammer - Add ssh-remote directive
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 11 Sep 2012 21:39:17 +0000 (14:39 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 11 Sep 2012 21:39:17 +0000 (14:39 -0700)
commit69f5a58c83dcada00192aa7abe08c6275732aa5e
tree9b0432615363d44fe3d0c233677e4a1b44650a17
parent269cdd19207ce00287eaced36ede8a8d2a36e043
hammer - Add ssh-remote directive

* Adds a feature that allows you to set up a command="..." prefix for a
  ssh key in your ~/.ssh/authorized_keys file that only runs the hammer
  utility and only with specific commands and filesystem paths.

  For example:

  command="/sbin/hammer ssh-remote mirror-read,mirror-write /path/" ssh-rsa...

  Currently requires a trailing '/' if you want to restrict the path to
  a subdirectory.  Multiple commands can be listed but the filesystem path
  restriction is only currently tested for mirror-read and mirror-write.

* This allows ssh to be used for mirroring without having to give shell
  access to the remote.
sbin/hammer/Makefile
sbin/hammer/cmd_mirror.c
sbin/hammer/cmd_remote.c [new file with mode: 0644]
sbin/hammer/hammer.8
sbin/hammer/hammer.c
sbin/hammer/hammer.h
sbin/hammer/hammer_util.h
sbin/hammer/misc.c