From 17ba1565f6dc3874c554f37ca949ad284647141d Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Wed, 7 Sep 2016 17:21:19 +0200
Subject: [PATCH 127/127] Revert "CONFIG: Use default config when none
provided"
This reverts commit 59744cff6edb106ae799b2321cb8731edadf409a.
---
Makefile.am | 10 ----------
contrib/sssd.spec.in | 3 ---
src/confdb/confdb.h | 1 -
src/confdb/confdb_setup.c | 40 ++++------------------------------------
src/examples/sssd-shadowutils | 6 ------
src/examples/sssd.conf | 17 -----------------
6 files changed, 4 insertions(+), 73 deletions(-)
delete mode 100644 src/examples/sssd-shadowutils
delete mode 100644 src/examples/sssd.conf
diff --git a/Makefile.am b/Makefile.am
index b8cd8b64ca8a130a5dd3107e1fb1445310192059..056c73bb265523705a0de16d4d5e078f516f566f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,7 +35,6 @@ endif
sssdlibexecdir = $(libexecdir)/sssd
sssdlibdir = $(libdir)/sssd
-sssddefaultconfdir = $(sssdlibdir)/conf
ldblibdir = @ldblibdir@
if BUILD_KRB5_LOCATOR_PLUGIN
krb5plugindir = @krb5pluginpath@
@@ -85,7 +84,6 @@ pkgconfigdir = $(libdir)/pkgconfig
krb5rcachedir = @krb5rcachedir@
sudolibdir = @sudolibpath@
polkitdir = @polkitdir@
-pamconfdir = $(sysconfdir)/pam.d
systemtap_tapdir = @tapset_dir@
secdbpath = @secdbpath@
@@ -464,7 +462,6 @@ AM_CPPFLAGS = \
-DSSSDDATADIR=\"$(sssddatadir)\" \
-DSSSD_LIBEXEC_PATH=\"$(sssdlibexecdir)\" \
-DSSSD_CONF_DIR=\"$(sssdconfdir)\" \
- -DSSSD_DEFAULT_CONF_DIR=\"$(sssddefaultconfdir)\" \
-DSSS_NSS_MCACHE_DIR=\"$(mcpath)\" \
-DSSS_NSS_SOCKET_NAME=\"$(pipepath)/nss\" \
-DSSS_PAM_SOCKET_NAME=\"$(pipepath)/pam\" \
@@ -1465,12 +1462,6 @@ dist_noinst_DATA += \
src/sss_client/COPYING.LESSER \
src/m4
-dist_sssddefaultconf_DATA = \
- src/examples/sssd.conf
-
-dist_pamconf_DATA = \
- src/examples/sssd-shadowutils
-
######################
# Command-line Tools #
######################
@@ -3972,7 +3963,6 @@ SSSD_USER_DIRS = \
$(DESTDIR)$(gpocachepath) \
$(DESTDIR)$(sssdconfdir) \
$(DESTDIR)$(sssdconfdir)/conf.d \
- $(DESTDIR)$(sssddefaultconfdir) \
$(DESTDIR)$(logpath) \
$(NULL)
diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index cb68a73e85122b016de7df37bcf4fc232a10a2ac..4e24aa39c65ad698607615d93de8624e2e1832ff 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -800,9 +800,6 @@ done
%dir %{_sysconfdir}/rwtab.d
%config(noreplace) %{_sysconfdir}/rwtab.d/sssd
%dir %{_datadir}/sssd
-%{_sysconfdir}/pam.d/sssd-shadowutils
-%{_libdir}/%{name}/conf/sssd.conf
-
%{_datadir}/sssd/cfg_rules.ini
%{_datadir}/sssd/sssd.api.conf
%{_datadir}/sssd/sssd.api.d
diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h
index 72adbd80ea534eb0becd3e517c00b0c26d00444c..e8df280562d7014e0dc5d4fe5c3336eaba204537 100644
--- a/src/confdb/confdb.h
+++ b/src/confdb/confdb.h
@@ -40,7 +40,6 @@
#define CONFDB_DEFAULT_CFG_FILE_VER 2
#define CONFDB_FILE "config.ldb"
-#define SSSD_DEFAULT_CONFIG_FILE SSSD_DEFAULT_CONF_DIR"/sssd.conf"
#define SSSD_CONFIG_FILE SSSD_CONF_DIR"/sssd.conf"
#define CONFDB_DEFAULT_CONFIG_DIR SSSD_CONF_DIR"/conf.d"
#define SSSD_MIN_ID 1
diff --git a/src/confdb/confdb_setup.c b/src/confdb/confdb_setup.c
index d6feab9000d54d2c3761de6d8e990053ade7e85f..a71d9dd1202824b3c9a7e69f1d8fa905ac1b8c02 100644
--- a/src/confdb/confdb_setup.c
+++ b/src/confdb/confdb_setup.c
@@ -21,14 +21,12 @@
#include "config.h"
#include <sys/stat.h>
-#include <unistd.h>
#include "util/util.h"
#include "db/sysdb.h"
#include "confdb.h"
#include "confdb_private.h"
#include "confdb_setup.h"
#include "util/sss_ini.h"
-#include "tools/tools_util.h"
static int confdb_test(struct confdb_ctx *cdb)
@@ -161,41 +159,11 @@ static int confdb_init_db(const char *config_file, const char *config_dir,
DEBUG(SSSDBG_TRACE_FUNC,
"sss_ini_config_file_open failed: %s [%d]\n", strerror(ret),
ret);
- if (ret != ENOENT) {
- /* Anything other than ENOENT is unrecoverable */
- goto done;
- } else {
- /* Copy the default configuration file to the standard location
- * and then retry
- */
- ret = copy_file_secure(SSSD_DEFAULT_CONFIG_FILE,
- SSSD_CONFIG_FILE,
- 0600,
- getuid(),
- getgid(),
- false);
- if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE,
- "Could not copy default configuration: %s",
- sss_strerror(ret));
- /* sss specific error denoting missing configuration file */
- ret = ERR_MISSING_CONF;
- goto done;
- }
-
- /* Try again */
- ret = sss_ini_config_file_open(init_data, config_file);
- if (ret != EOK) {
- DEBUG(SSSDBG_TRACE_FUNC,
- "sss_ini_config_file_open(default) failed: %s [%d]\n",
- strerror(ret), ret);
- if (ret == ENOENT) {
- /* sss specific error denoting missing configuration file */
- ret = ERR_MISSING_CONF;
- }
- goto done;
- }
+ if (ret == ENOENT) {
+ /* sss specific error denoting missing configuration file */
+ ret = ERR_MISSING_CONF;
}
+ goto done;
}
ret = sss_ini_config_access_check(init_data);
diff --git a/src/examples/sssd-shadowutils b/src/examples/sssd-shadowutils
deleted file mode 100644
index 626c7d075dfbf97dd91e259f94c6061689c83e9e..0000000000000000000000000000000000000000
--- a/src/examples/sssd-shadowutils
+++ /dev/null
@@ -1,6 +0,0 @@
-#%PAM-1.0
-auth [success=done ignore=ignore default=die] pam_unix.so nullok try_first_pass
-auth required pam_deny.so
-
-account required pam_unix.so
-account required pam_permit.so
diff --git a/src/examples/sssd.conf b/src/examples/sssd.conf
deleted file mode 100644
index a851dbb7ecd5c3220fbd6a946a6c7be2822dbd27..0000000000000000000000000000000000000000
--- a/src/examples/sssd.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-[sssd]
-config_file_version = 2
-services = nss, pam
-domains = shadowutils
-
-[nss]
-
-[pam]
-
-[domain/shadowutils]
-id_provider = proxy
-proxy_lib_name = files
-
-auth_provider = proxy
-proxy_pam_target = sssd-shadowutils
-
-proxy_fast_alias = True
--
2.7.4