logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

image-factory-sudo-helper - Run certain commands as root

Author

       Benjamin Drung <benjamin.drung@ionos.com>

image-factory-sudo-helper                          2020-08-05                       IMAGE-FACTORY-SUDO-HELPER(1)

Description

image-factory  can  be  run  as normal user, but it need root permission for a few operations like chmod,
       mount, and umount.  Since these operations cannot be secured with sudo’s  wildcards,  image-factory-sudo-helper was introduced to check the commands using regular expression.

       image-factory-sudo-helper  will  take  a command (including parameters) and checks if it one of the three
       allowed commands:

       • chmod on files or (sub-)directories in /tmp/image-factory

       • mount of loop device in /tmp/image-factory

       • umount in /tmp/image-factory

       If the given command passes is one of the allowed commands, it will be executed.  Otherwise an error mes‐
       sage will be printed.

Environment

       If the environment variable DRYRUN is set, the given command will not be executed but printed instead.

Name

       image-factory-sudo-helper - Run certain commands as root

Synopsis

image-factory-sudo-helperCOMMAND

Usage

       To allow running image-factory as normal user, only image-factory-sudo-helper needs sudo  permission  for
       the user.  Example sudo configuration for user jenkins:

              jenkins ALL = NOPASSWD:SETENV: /usr/bin/image-factory-sudo-helper

See Also