]> granicus.if.org Git - sudo/commitdiff
Rename sample_group plugin to group_file.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 18 Feb 2013 20:32:36 +0000 (15:32 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 18 Feb 2013 20:32:36 +0000 (15:32 -0500)
Install group_file and system_group plugins by default.

12 files changed:
MANIFEST
Makefile.in
configure
configure.in
doc/sudoers.cat
doc/sudoers.man.in
doc/sudoers.mdoc.in
plugins/group_file/Makefile.in [moved from plugins/sample_group/Makefile.in with 84% similarity]
plugins/group_file/getgrent.c [moved from plugins/sample_group/getgrent.c with 98% similarity]
plugins/group_file/group_file.c [moved from plugins/sample_group/sample_group.c with 92% similarity]
plugins/group_file/group_file.exp [moved from plugins/sample_group/sample_group.exp with 100% similarity]
plugins/group_file/plugin_test.c [moved from plugins/sample_group/plugin_test.c with 97% similarity]

index 8aca34e0c48915412d3f74e97233b6099c04d12f..9818aa9602ca3766dbab75217f622ff601cca979 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -148,14 +148,14 @@ mkdep.pl
 mkinstalldirs
 mkpkg
 pathnames.h.in
+plugins/group_file/Makefile.in
+plugins/group_file/getgrent.c
+plugins/group_file/group_file.c
+plugins/group_file/group_file.exp
+plugins/group_file/plugin_test.c
 plugins/sample/Makefile.in
 plugins/sample/sample_plugin.c
 plugins/sample/sample_plugin.exp
-plugins/sample_group/Makefile.in
-plugins/sample_group/getgrent.c
-plugins/sample_group/plugin_test.c
-plugins/sample_group/sample_group.c
-plugins/sample_group/sample_group.exp
 plugins/sudoers/Makefile.in
 plugins/sudoers/aixcrypt.exp
 plugins/sudoers/alias.c
index 25afe75316ee860102d75f2989fff7ebdb565120..bf243fb6b8772fa4ffcb6396a1feccaa9dc7b919 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2010-2011 Todd C. Miller <Todd.Miller@courtesan.com>
+# Copyright (c) 2010-2013 Todd C. Miller <Todd.Miller@courtesan.com>
 #
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -46,9 +46,8 @@ sudoers_gid = @SUDOERS_GID@
 sudoers_mode = @SUDOERS_MODE@
 shlib_mode = @SHLIB_MODE@
 
-SUBDIRS = compat common @ZLIB_SRC@ plugins/sudoers src include doc
-
-SAMPLES = plugins/sample plugins/sample_group plugins/system_group
+SUBDIRS = compat common @ZLIB_SRC@ plugins/group_file plugins/sudoers \
+         plugins/system_group src include doc
 
 VERSION = @PACKAGE_VERSION@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -77,13 +76,7 @@ XGETTEXT_OPTS = -F -k_ -kN_ --copyright-holder="Todd C. Miller" \
                --flag easprintf:3:c-format --flag lbuf_append:2:c-format \
                --flag lbuf_append_quoted:3:c-format --foreign-user
 
-all: config.status
-       for d in $(SUBDIRS) $(SAMPLES); \
-           do (cd $$d && exec $(MAKE) $@) && continue; \
-           exit $$?; \
-       done
-
-check pre-install: config.status
+all check pre-install: config.status
        for d in $(SUBDIRS); \
            do (cd $$d && exec $(MAKE) $@) && continue; \
            exit $$?; \
@@ -132,14 +125,14 @@ depend: siglist.c signame.c
        fi; \
        $(srcdir)/mkdep.pl $(srcdir)/common/Makefile.in \
            $(srcdir)/compat/Makefile.in $(srcdir)/plugins/sample/Makefile.in \
-           $(srcdir)/plugins/sample_group/Makefile.in \
+           $(srcdir)/plugins/group_file/Makefile.in \
            $(srcdir)/plugins/sudoers/Makefile.in \
            $(srcdir)/plugins/system_group/Makefile.in \
            $(srcdir)/src/Makefile.in $(srcdir)/zlib/Makefile.in; \
        ./config.status --file $(srcdir)/common/Makefile \
            --file $(srcdir)/compat/Makefile \
            --file $(srcdir)/plugins/sample/Makefile \
-           --file $(srcdir)/plugins/sample_group/Makefile \
+           --file $(srcdir)/plugins/group_file/Makefile \
            --file $(srcdir)/plugins/sudoers/Makefile \
            --file $(srcdir)/plugins/system_group/Makefile \
            --file $(srcdir)/src/Makefile --file $(srcdir)/zlib/Makefile
@@ -297,14 +290,14 @@ package: sudo.pp
            version=$(VERSION) $(PPVARS)
 
 clean: config.status
-       for d in $(SUBDIRS) $(SAMPLES); do \
+       for d in $(SUBDIRS); do \
            (cd $$d && exec $(MAKE) $@); \
        done
 
 mostlyclean: clean
 
 distclean: config.status
-       for d in $(SUBDIRS) $(SAMPLES); do \
+       for d in $(SUBDIRS); do \
            (cd $$d && exec $(MAKE) $@); \
        done
        -rm -rf Makefile pathnames.h config.h config.status config.cache \
index caf0c8723edf574988ff08b7d7ce717b012ddae6..ae14729969cb634c1a4133753f45c979297ad62b 100755 (executable)
--- a/configure
+++ b/configure
@@ -21206,7 +21206,7 @@ test "$localedir" = '${datarootdir}/locale' && localedir='$(datarootdir)/locale'
 test "$localstatedir" = '${prefix}/var' && localstatedir='$(prefix)/var'
 test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/etc'
 
-ac_config_files="$ac_config_files Makefile common/Makefile compat/Makefile doc/Makefile include/Makefile src/sudo_usage.h src/Makefile plugins/sample/Makefile plugins/sample_group/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers"
+ac_config_files="$ac_config_files Makefile common/Makefile compat/Makefile doc/Makefile include/Makefile src/sudo_usage.h src/Makefile plugins/sample/Makefile plugins/group_file/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -22208,7 +22208,7 @@ do
     "src/sudo_usage.h") CONFIG_FILES="$CONFIG_FILES src/sudo_usage.h" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
     "plugins/sample/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/sample/Makefile" ;;
-    "plugins/sample_group/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/sample_group/Makefile" ;;
+    "plugins/group_file/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/group_file/Makefile" ;;
     "plugins/system_group/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/system_group/Makefile" ;;
     "plugins/sudoers/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/sudoers/Makefile" ;;
     "plugins/sudoers/sudoers") CONFIG_FILES="$CONFIG_FILES plugins/sudoers/sudoers" ;;
index 83bb5d643c9ed47539c261a399afcc1440544360..510f5fa3e2c03e4065d31352fe287139269ad3e5 100644 (file)
@@ -3618,7 +3618,7 @@ test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/
 dnl
 dnl Substitute into the Makefile and man pages
 dnl
-AC_CONFIG_FILES([Makefile common/Makefile compat/Makefile doc/Makefile include/Makefile src/sudo_usage.h src/Makefile plugins/sample/Makefile plugins/sample_group/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers])
+AC_CONFIG_FILES([Makefile common/Makefile compat/Makefile doc/Makefile include/Makefile src/sudo_usage.h src/Makefile plugins/sample/Makefile plugins/group_file/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers])
 AC_OUTPUT
 
 dnl
index e65fb3d0584e74ad202faeb8d353c5821eddb109..d78221f4d4867e7ac5237152b3dffa16c60ae157 100644 (file)
@@ -1415,7 +1415,7 @@ S\bSU\bUD\bDO\bOE\bER\bRS\bS O\bOP\bPT\bTI\bIO\bON\bNS\bS
                    For example, given _\b/_\be_\bt_\bc_\b/_\bs_\bu_\bd_\bo_\b-_\bg_\br_\bo_\bu_\bp, a group file in Unix
                    group format, the sample group plugin can be used:
 
-                   Defaults group_plugin="sample_group.so /etc/sudo-group"
+                   Defaults group_plugin="group_file.so /etc/sudo-group"
 
                    For more information see sudo_plugin(4).
 
index 4329420b4b86568b74387a86fdc7cb70144481a3..b056b0cb7e74e0ae6a5315f113f8ad2e0168c1b6 100644 (file)
@@ -2941,7 +2941,7 @@ a group file in Unix group format, the sample group plugin can be used:
 .nf
 .sp
 .RS 0n
-Defaults group_plugin="sample_group.so /etc/sudo-group"
+Defaults group_plugin="group_file.so /etc/sudo-group"
 .RE
 .fi
 .sp
index c48597ad3d2fd15f3c4f7aa2e34ee0be5a23e592..f6558464af8b8985a387ce30f5686bf82b79a34d 100644 (file)
@@ -2738,7 +2738,7 @@ For example, given
 .Pa /etc/sudo-group ,
 a group file in Unix group format, the sample group plugin can be used:
 .Bd -literal
-Defaults group_plugin="sample_group.so /etc/sudo-group"
+Defaults group_plugin="group_file.so /etc/sudo-group"
 .Ed
 .Pp
 For more information see
similarity index 84%
rename from plugins/sample_group/Makefile.in
rename to plugins/group_file/Makefile.in
index a65c5bb6b41d16cb22ac91895518ebc41b31f312..e6581c5d2c593451302a8692750e1a0fb61483f3 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011 Todd C. Miller <Todd.Miller@courtesan.com>
+# Copyright (c) 2011, 2013 Todd C. Miller <Todd.Miller@courtesan.com>
 #
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -69,9 +69,9 @@ plugindir = @PLUGINDIR@
 # File extension, mode and map file to use for shared libraries/objects
 soext = @SOEXT@
 shlib_mode = @SHLIB_MODE@
-shlib_exp = $(srcdir)/sample_group.exp
-shlib_map = sample_group.map
-shlib_opt = sample_group.opt
+shlib_exp = $(srcdir)/group_file.exp
+shlib_map = group_file.map
+shlib_opt = group_file.opt
 
 # OS dependent defines
 DEFS = @OSDEFS@
@@ -80,16 +80,16 @@ DEFS = @OSDEFS@
 
 SHELL = @SHELL@
 
-OBJS = sample_group.lo getgrent.lo
+OBJS = group_file.lo getgrent.lo
 
 LIBOBJDIR = $(top_builddir)/@ac_config_libobj_dir@/
 
 VERSION = @PACKAGE_VERSION@
 
-all: sample_group.la
+all: group_file.la
 
 Makefile: $(srcdir)/Makefile.in
-       (cd $(top_builddir) && ./config.status --file plugins/sample_group/Makefile)
+       (cd $(top_builddir) && ./config.status --file plugins/group_file/Makefile)
 
 .SUFFIXES: .o .c .h .lo
 
@@ -102,7 +102,7 @@ $(shlib_map): $(shlib_exp)
 $(shlib_opt): $(shlib_exp)
        @sed 's/^/+e /' $(shlib_exp) > $@
 
-sample_group.la: $(OBJS) $(LT_LIBS) @LT_LDDEP@
+group_file.la: $(OBJS) $(LT_LIBS) @LT_LDDEP@
        $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(LT_LDFLAGS) -o $@ $(OBJS) $(LIBS) -module -avoid-version -rpath $(plugindir)
 
 pre-install:
@@ -118,11 +118,11 @@ install-includes:
 
 install-doc:
 
-install-plugin: install-dirs sample_group.la
-       $(INSTALL) -b~ -m $(shlib_mode) .libs/sample_group$(soext) $(DESTDIR)$(plugindir)
+install-plugin: install-dirs group_file.la
+       $(INSTALL) -b~ -m $(shlib_mode) .libs/group_file$(soext) $(DESTDIR)$(plugindir)
 
 uninstall:
-       -rm -f $(DESTDIR)$(plugindir)/sample_group$(soext)
+       -rm -f $(DESTDIR)$(plugindir)/group_file$(soext)
 
 check:
 
@@ -144,7 +144,7 @@ cleandir: realclean
 # Autogenerated dependencies, do not modify
 getgrent.lo: $(srcdir)/getgrent.c $(top_builddir)/config.h $(incdir)/missing.h
        $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/getgrent.c
-sample_group.lo: $(srcdir)/sample_group.c $(top_builddir)/config.h \
+group_file.lo: $(srcdir)/group_file.c $(top_builddir)/config.h \
                  $(top_srcdir)/compat/stdbool.h $(incdir)/sudo_plugin.h \
                  $(incdir)/missing.h
-       $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/sample_group.c
+       $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/group_file.c
similarity index 98%
rename from plugins/sample_group/getgrent.c
rename to plugins/group_file/getgrent.c
index 5c7a319b6e88b46d752f8480634b5dbb366ce9d9..68e004e496f29e251deaef385527bafc6381e42b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005,2008,2010-2011 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2005,2008,2010-2013 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
similarity index 92%
rename from plugins/sample_group/sample_group.c
rename to plugins/group_file/group_file.c
index 2d46693d6123a7d4ca5ea7a57745e54a0503a0d3..77d65b68d1e03a774f940ffd4bff93b893f4874b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2010-2013 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -76,7 +76,7 @@ sample_init(int version, sudo_printf_t sudo_printf, char *const argv[])
 
     if (GROUP_API_VERSION_GET_MAJOR(version) != GROUP_API_VERSION_MAJOR) {
        sudo_log(SUDO_CONV_ERROR_MSG,
-           "sample_group: incompatible major version %d, expected %d\n",
+           "group_file: incompatible major version %d, expected %d\n",
            GROUP_API_VERSION_GET_MAJOR(version),
            GROUP_API_VERSION_MAJOR);
        return -1;
@@ -85,12 +85,12 @@ sample_init(int version, sudo_printf_t sudo_printf, char *const argv[])
     /* Sanity check the specified group file. */
     if (argv == NULL || argv[0] == NULL) {
        sudo_log(SUDO_CONV_ERROR_MSG,
-           "sample_group: path to group file not specified\n");
+           "group_file: path to group file not specified\n");
        return -1;
     }
     if (stat(argv[0], &sb) != 0) {
        sudo_log(SUDO_CONV_ERROR_MSG,
-           "sample_group: %s: %s\n", argv[0], strerror(errno));
+           "group_file: %s: %s\n", argv[0], strerror(errno));
        return -1;
     }
     if ((sb.st_mode & (S_IWGRP|S_IWOTH)) != 0) {
similarity index 97%
rename from plugins/sample_group/plugin_test.c
rename to plugins/group_file/plugin_test.c
index a74deb1c41727555f05b967f2d0c2f2348344a9e..cd63bffdfc78452746ce74fa78857ab991253ad4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2011 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2010-2013 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -170,7 +170,7 @@ int
 main(int argc, char *argv[])
 {
     int ch, i, found;
-    char *plugin = "sample_group.so";
+    char *plugin = "group_file.so";
     char *user, *group;
     struct passwd *pwd;