Rename sample_group plugin to group_file.

Install group_file and system_group plugins by default.
This commit is contained in:
Todd C. Miller
2013-02-18 15:32:36 -05:00
parent b9159ecb26
commit e07280eeeb
12 changed files with 39 additions and 46 deletions

View File

@@ -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

View 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 \

4
configure vendored
View File

@@ -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" ;;

View 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

View File

@@ -1415,7 +1415,7 @@ SSUUDDOOEERRSS OOPPTTIIOONNSS
For example, given _/_e_t_c_/_s_u_d_o_-_g_r_o_u_p, 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).

View 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

View 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

View 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

View 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

View 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) {

View 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;