[fedfs-utils] [PATCH 8/8] configure.ac: Add a --with-fedfsuser and --with-statedir options
Chuck Lever
chuck.lever at oracle.com
Tue Sep 20 07:21:26 PDT 2011
On Sep 19, 2011, at 6:42 PM, Chuck Lever wrote:
> Allow distributions to set the name of the user ID and group ID used
> for FedFS system operations, and the directory used to contain TLS
> certs and the NSDB parameter database.
This directory is called out in several man pages. This patch should include changes to doc/man/Makefile.am to modify those man pages with the correct directory pathname at install time.
So, NACK -- more work needed. :-)
> Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
> ---
>
> configure.ac | 18 ++++++++++++++++++
> src/include/fedfs.h | 15 ---------------
> 2 files changed, 18 insertions(+), 15 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 33f94b1..3647dba 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -36,6 +36,24 @@ AC_CONFIG_MACRO_DIR([m4])
> LT_INIT
> AM_INIT_AUTOMAKE
>
> +# configure command line options
> +AC_ARG_WITH([fedfsuser],
> + [AC_HELP_STRING([--with-fedfsuser=name],
> + [User name to use when dropping privileges @<:@default=fedfs@:>@])],
> + fedfsuser=$withval,
> + fedfsuser=fedfs)
> + AC_SUBST(fedfsuser)
> + AC_DEFINE_UNQUOTED([FEDFS_USER], ["$fedfsuser"],
> + [Define to the user name to use when dropping privileges.])
> +AC_ARG_WITH([statedir],
> + [AC_HELP_STRING([--with-statedir=pathname],
> + [Default pathname of directory where fedfsd maintains persistent state @<:@default=/var/lib/fedfs@:>@])],
> + statedir=$withval,
> + statedir=/var/lib/fedfs)
> + AC_SUBST(statedir)
> + AC_DEFINE_UNQUOTED([FEDFS_DEFAULT_STATEDIR], ["$statedir"],
> + [Define to the default pathname of the directory where fedfsd maintains persistent state.])
> +
> # Checks for programs.
> AC_PROG_CC
> AC_PROG_INSTALL
> diff --git a/src/include/fedfs.h b/src/include/fedfs.h
> index 483dda4..9c4670a 100644
> --- a/src/include/fedfs.h
> +++ b/src/include/fedfs.h
> @@ -47,21 +47,6 @@
> #define FEDFS_DATABASE_FILE "nsdbparam.sqlite3"
>
> /**
> - * Default pathname of directory where fedfsd maintains persistent state
> - */
> -#ifndef FEDFS_DEFAULT_STATEDIR
> -#define FEDFS_DEFAULT_STATEDIR "/var/lib/fedfs"
> -#endif /* FEDFS_DEFAULT_STATEDIR */
> -
> -/**
> - * User name to use when dropping privileges. This user is
> - * typically the owner of default state directory.
> - */
> -#ifndef FEDFS_USER
> -#define FEDFS_USER "fedfs"
> -#endif /* FEDFS_USER */
> -
> -/**
> * Initial number of seconds to wait after receiving FEDFS_ERR_DELAY
> */
> #define FEDFS_DELAY_MIN_SECS 2
>
>
> _______________________________________________
> fedfs-utils-devel mailing list
> fedfs-utils-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/fedfs-utils-devel
--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
More information about the fedfs-utils-devel
mailing list