git: hammer - Add ssh-remote directive

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Sep 11 14:43:33 PDT 2012


commit 69f5a58c83dcada00192aa7abe08c6275732aa5e
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Sep 11 14:39:17 2012 -0700

    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.

Summary of changes:
 sbin/hammer/Makefile                       |    2 +-
 sbin/hammer/cmd_mirror.c                   |    2 +
 sbin/hammer/{cmd_status.c => cmd_remote.c} |   57 ++++++++++++++++++++--------
 sbin/hammer/hammer.8                       |   25 ++++++++++++
 sbin/hammer/hammer.c                       |   42 ++++++++++++++++++++-
 sbin/hammer/hammer.h                       |    2 +
 sbin/hammer/hammer_util.h                  |    1 +
 sbin/hammer/misc.c                         |   29 ++++++++++++++
 8 files changed, 142 insertions(+), 18 deletions(-)
 copy sbin/hammer/{cmd_status.c => cmd_remote.c} (64%)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/69f5a58c83dcada00192aa7abe08c6275732aa5e


-- 
DragonFly BSD source repository



More information about the Commits mailing list