Rename sample_group plugin to group_file.
Install group_file and system_group plugins by default.
This commit is contained in:
@@ -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
|
@@ -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
|
@@ -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) {
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user