source: clfs-sysroot/patches/shadow-4.1.2.2-sysroot_hacks-2.patch@ 8fedadb

Last change on this file since 8fedadb was 63c1d49, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Updated the shadow sysroot hacks patch so that shadows applications dont try to flush the nscd cache for their respective programs.

  • Property mode set to 100644
File size: 32.4 KB
  • contrib/Makefile.in

    Submitted By: Joe Ciccone <jciccone@gmail.com>
    Date: 2006-11-24
    Initial Package Version: 4.0.18.1
            Rediffed Against 4.1.2.2 by Joe Ciccone on 2009-01-03
    Origin: Joe Ciccone
    Upstream Status: None
    Description: Changes the hardcoded /etc to the value of the --sysconfdir
                 parameter passed to configure. Allows the utilities to be run
                 as a user other then root and properly modify the passwd and group
                 files for the target system. This patch also disables the
                 calls that flushes the nscd cache. There is no point in flushing
                 the hosts cache db when it wasn't modified.
    
    diff -Naur shadow-4.1.2.2.orig/contrib/Makefile.in shadow-4.1.2.2/contrib/Makefile.in
    old new  
    184184srcdir = @srcdir@
    185185sysconfdir = @sysconfdir@
    186186target_alias = @target_alias@
     187top_build_prefix = @top_build_prefix@
    187188top_builddir = @top_builddir@
    188189top_srcdir = @top_srcdir@
    189190EXTRA_DIST = README adduser.c adduser-old.c adduser.sh adduser2.sh \
  • doc/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/doc/Makefile.in shadow-4.1.2.2/doc/Makefile.in
    old new  
    184184srcdir = @srcdir@
    185185sysconfdir = @sysconfdir@
    186186target_alias = @target_alias@
     187top_build_prefix = @top_build_prefix@
    187188top_builddir = @top_builddir@
    188189top_srcdir = @top_srcdir@
    189190EXTRA_DIST = HOWTO README.limits \
  • etc/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/etc/Makefile.in shadow-4.1.2.2/etc/Makefile.in
    old new  
    209209srcdir = @srcdir@
    210210sysconfdir = @sysconfdir@
    211211target_alias = @target_alias@
     212top_build_prefix = @top_build_prefix@
    212213top_builddir = @top_builddir@
    213214top_srcdir = @top_srcdir@
    214215sysconf_DATA = login.defs
  • etc/pam.d/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/etc/pam.d/Makefile.in shadow-4.1.2.2/etc/pam.d/Makefile.in
    old new  
    194194srcdir = @srcdir@
    195195sysconfdir = @sysconfdir@
    196196target_alias = @target_alias@
     197top_build_prefix = @top_build_prefix@
    197198top_builddir = @top_builddir@
    198199top_srcdir = @top_srcdir@
    199200pamd_files = \
  • lib/commonio.c

    diff -Naur shadow-4.1.2.2.orig/lib/commonio.c shadow-4.1.2.2/lib/commonio.c
    old new  
    183183        if (!fp)
    184184                return NULL;
    185185
    186 #ifdef HAVE_FCHOWN
    187         if (fchown (fileno (fp), sb->st_uid, sb->st_gid))
    188                 goto fail;
    189 #else
    190         if (chown (name, sb->st_mode))
    191                 goto fail;
    192 #endif
    193 
    194186#ifdef HAVE_FCHMOD
    195187        if (fchmod (fileno (fp), sb->st_mode & 0664))
    196188                goto fail;
     
    353345                if (lock_count == 0) {
    354346                        /* Tell nscd when lock count goes to zero,
    355347                           if any of the files were changed.  */
     348
    356349                        if (nscd_need_reload) {
    357                                 nscd_flush_cache ("passwd");
    358                                 nscd_flush_cache ("group");
     350//                              nscd_flush_cache ("passwd");
     351//                              nscd_flush_cache ("group");
    359352                                nscd_need_reload = 0;
    360353                        }
    361354#ifdef HAVE_LCKPWDF
     
    749742                 * Default permissions for new [g]shadow files.
    750743                 * (passwd and group always exist...)
    751744                 */
    752                 sb.st_mode = 0400;
     745                sb.st_mode = 0600;
    753746                sb.st_uid = 0;
    754747                sb.st_gid = 0;
    755748        }
  • lib/defines.h

    diff -Naur shadow-4.1.2.2.orig/lib/defines.h shadow-4.1.2.2/lib/defines.h
    old new  
    265265        (strncpy((A), (B), sizeof(A) - 1), (A)[sizeof(A) - 1] = '\0')
    266266
    267267#ifndef PASSWD_FILE
    268 #define PASSWD_FILE "/etc/passwd"
     268#define PASSWD_FILE SYSCONFDIR"/passwd"
    269269#endif
    270270
    271271#ifndef GROUP_FILE
    272 #define GROUP_FILE "/etc/group"
     272#define GROUP_FILE SYSCONFDIR"/group"
    273273#endif
    274274
    275275#ifndef SHADOW_FILE
    276 #define SHADOW_FILE "/etc/shadow"
     276#define SHADOW_FILE SYSCONFDIR"/shadow"
    277277#endif
    278278
    279279#ifdef SHADOWGRP
    280280#ifndef SGROUP_FILE
    281 #define SGROUP_FILE "/etc/gshadow"
     281#define SGROUP_FILE SYSCONFDIR"/gshadow"
    282282#endif
    283283#endif
    284284
  • shadow-4.1.2.2

    diff -Naur shadow-4.1.2.2.orig/lib/getdef.c shadow-4.1.2.2/lib/getdef.c
    old new  
    127127};
    128128
    129129#ifndef LOGINDEFS
    130 #define LOGINDEFS "/etc/login.defs"
     130#define LOGINDEFS SYSCONFDIR"/login.defs"
    131131#endif
    132132
    133133static char def_fname[] = LOGINDEFS;    /* login config defs file       */
  • lib/gshadow_.h

    diff -Naur shadow-4.1.2.2.orig/lib/gshadow_.h shadow-4.1.2.2/lib/gshadow_.h
    old new  
    7171int putsgent ();
    7272#endif
    7373
    74 #define GSHADOW "/etc/gshadow"
     74#define GSHADOW SYSCONFDIR"/gshadow"
    7575#endif                          /* ifndef _H_GSHADOW */
  • lib/Makefile.am

    diff -Naur shadow-4.1.2.2.orig/lib/Makefile.am shadow-4.1.2.2/lib/Makefile.am
    old new  
    22AUTOMAKE_OPTIONS = 1.0 foreign
    33
    44DEFS =
     5AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
    56
    67noinst_LTLIBRARIES = libshadow.la
    78
  • lib/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/lib/Makefile.in shadow-4.1.2.2/lib/Makefile.in
    old new  
    206206srcdir = @srcdir@
    207207sysconfdir = @sysconfdir@
    208208target_alias = @target_alias@
     209top_build_prefix = @top_build_prefix@
    209210top_builddir = @top_builddir@
    210211top_srcdir = @top_srcdir@
    211212AUTOMAKE_OPTIONS = 1.0 foreign
     213AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
    212214noinst_LTLIBRARIES = libshadow.la
    213215libshadow_la_LDFLAGS = -version-info 0:0:0
    214216libshadow_la_SOURCES = \
  • shadow-4.1.2.2

    diff -Naur shadow-4.1.2.2.orig/lib/port.h shadow-4.1.2.2/lib/port.h
    old new  
    5252 * PORT_DAY - Day of the week to a bit value (0 = Sunday).
    5353 */
    5454
    55 #define PORTS   "/etc/porttime"
     55#define PORTS   SYSCONFDIR"/porttime"
    5656#define PORT_IDS        64
    5757#define PORT_TTY        64
    5858#define PORT_TIMES      24
  • libmisc/limits.c

    diff -Naur shadow-4.1.2.2.orig/libmisc/limits.c shadow-4.1.2.2/libmisc/limits.c
    old new  
    5454#endif
    5555#ifdef LIMITS
    5656#ifndef LIMITS_FILE
    57 #define LIMITS_FILE "/etc/limits"
     57#define LIMITS_FILE SYSCONFDIR"/limits"
    5858#endif
    5959#define LOGIN_ERROR_RLIMIT      1
    6060#define LOGIN_ERROR_LOGIN       2
  • libmisc/Makefile.am

    diff -Naur shadow-4.1.2.2.orig/libmisc/Makefile.am shadow-4.1.2.2/libmisc/Makefile.am
    old new  
    11
    22EXTRA_DIST = .indent.pro xgetXXbyYY.c
    33
     4AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
     5
    46INCLUDES = -I$(top_srcdir)/lib
    57
    68noinst_LIBRARIES = libmisc.a
  • libmisc/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/libmisc/Makefile.in shadow-4.1.2.2/libmisc/Makefile.in
    old new  
    223223srcdir = @srcdir@
    224224sysconfdir = @sysconfdir@
    225225target_alias = @target_alias@
     226top_build_prefix = @top_build_prefix@
    226227top_builddir = @top_builddir@
    227228top_srcdir = @top_srcdir@
    228229EXTRA_DIST = .indent.pro xgetXXbyYY.c
     230AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
    229231INCLUDES = -I$(top_srcdir)/lib
    230232noinst_LIBRARIES = libmisc.a
    231233libmisc_a_SOURCES = \
  • shadow-4.1.2.2

    diff -Naur shadow-4.1.2.2.orig/Makefile.in shadow-4.1.2.2/Makefile.in
    old new  
    209209srcdir = @srcdir@
    210210sysconfdir = @sysconfdir@
    211211target_alias = @target_alias@
     212top_build_prefix = @top_build_prefix@
    212213top_builddir = @top_builddir@
    213214top_srcdir = @top_srcdir@
    214215EXTRA_DIST = NEWS README TODO shadow.spec.in
  • man/cs/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/cs/Makefile.in shadow-4.1.2.2/man/cs/Makefile.in
    old new  
    188188srcdir = @srcdir@
    189189sysconfdir = @sysconfdir@
    190190target_alias = @target_alias@
     191top_build_prefix = @top_build_prefix@
    191192top_builddir = @top_builddir@
    192193top_srcdir = @top_srcdir@
    193194man_MANS = \
  • man/de/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/de/Makefile.in shadow-4.1.2.2/man/de/Makefile.in
    old new  
    190190srcdir = @srcdir@
    191191sysconfdir = @sysconfdir@
    192192target_alias = @target_alias@
     193top_build_prefix = @top_build_prefix@
    193194top_builddir = @top_builddir@
    194195top_srcdir = @top_srcdir@
    195196man_MANS = \
  • man/es/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/es/Makefile.in shadow-4.1.2.2/man/es/Makefile.in
    old new  
    188188srcdir = @srcdir@
    189189sysconfdir = @sysconfdir@
    190190target_alias = @target_alias@
     191top_build_prefix = @top_build_prefix@
    191192top_builddir = @top_builddir@
    192193top_srcdir = @top_srcdir@
    193194man_MANS = \
  • man/fi/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/fi/Makefile.in shadow-4.1.2.2/man/fi/Makefile.in
    old new  
    185185srcdir = @srcdir@
    186186sysconfdir = @sysconfdir@
    187187target_alias = @target_alias@
     188top_build_prefix = @top_build_prefix@
    188189top_builddir = @top_builddir@
    189190top_srcdir = @top_srcdir@
    190191man_MANS = \
  • man/fr/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/fr/Makefile.in shadow-4.1.2.2/man/fr/Makefile.in
    old new  
    192192srcdir = @srcdir@
    193193sysconfdir = @sysconfdir@
    194194target_alias = @target_alias@
     195top_build_prefix = @top_build_prefix@
    195196top_builddir = @top_builddir@
    196197top_srcdir = @top_srcdir@
    197198man_MANS = chage.1 chfn.1 chpasswd.8 chsh.1 expiry.1 faillog.5 \
  • man/hu/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/hu/Makefile.in shadow-4.1.2.2/man/hu/Makefile.in
    old new  
    188188srcdir = @srcdir@
    189189sysconfdir = @sysconfdir@
    190190target_alias = @target_alias@
     191top_build_prefix = @top_build_prefix@
    191192top_builddir = @top_builddir@
    192193top_srcdir = @top_srcdir@
    193194man_MANS = \
  • man/id/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/id/Makefile.in shadow-4.1.2.2/man/id/Makefile.in
    old new  
    186186srcdir = @srcdir@
    187187sysconfdir = @sysconfdir@
    188188target_alias = @target_alias@
     189top_build_prefix = @top_build_prefix@
    189190top_builddir = @top_builddir@
    190191top_srcdir = @top_srcdir@
    191192man_MANS = \
  • man/it/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/it/Makefile.in shadow-4.1.2.2/man/it/Makefile.in
    old new  
    192192srcdir = @srcdir@
    193193sysconfdir = @sysconfdir@
    194194target_alias = @target_alias@
     195top_build_prefix = @top_build_prefix@
    195196top_builddir = @top_builddir@
    196197top_srcdir = @top_srcdir@
    197198man_MANS = chage.1 chfn.1 chpasswd.8 chsh.1 expiry.1 faillog.5 \
  • man/ja/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/ja/Makefile.in shadow-4.1.2.2/man/ja/Makefile.in
    old new  
    189189srcdir = @srcdir@
    190190sysconfdir = @sysconfdir@
    191191target_alias = @target_alias@
     192top_build_prefix = @top_build_prefix@
    192193top_builddir = @top_builddir@
    193194top_srcdir = @top_srcdir@
    194195man_MANS = chage.1 chfn.1 chpasswd.8 chsh.1 expiry.1 faillog.5 \
  • man/ko/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/ko/Makefile.in shadow-4.1.2.2/man/ko/Makefile.in
    old new  
    188188srcdir = @srcdir@
    189189sysconfdir = @sysconfdir@
    190190target_alias = @target_alias@
     191top_build_prefix = @top_build_prefix@
    191192top_builddir = @top_builddir@
    192193top_srcdir = @top_srcdir@
    193194man_MANS = \
  • man/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/Makefile.in shadow-4.1.2.2/man/Makefile.in
    old new  
    204204srcdir = @srcdir@
    205205sysconfdir = @sysconfdir@
    206206target_alias = @target_alias@
     207top_build_prefix = @top_build_prefix@
    207208top_builddir = @top_builddir@
    208209top_srcdir = @top_srcdir@
    209210@USE_NLS_FALSE@SUBDIRS =
  • man/pl/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/pl/Makefile.in shadow-4.1.2.2/man/pl/Makefile.in
    old new  
    191191srcdir = @srcdir@
    192192sysconfdir = @sysconfdir@
    193193target_alias = @target_alias@
     194top_build_prefix = @top_build_prefix@
    194195top_builddir = @top_builddir@
    195196top_srcdir = @top_srcdir@
    196197man_MANS = chage.1 chfn.1 chgpasswd.8 chpasswd.8 chsh.1 expiry.1 \
  • man/pt_BR/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/pt_BR/Makefile.in shadow-4.1.2.2/man/pt_BR/Makefile.in
    old new  
    188188srcdir = @srcdir@
    189189sysconfdir = @sysconfdir@
    190190target_alias = @target_alias@
     191top_build_prefix = @top_build_prefix@
    191192top_builddir = @top_builddir@
    192193top_srcdir = @top_srcdir@
    193194man_MANS = \
  • man/ru/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/ru/Makefile.in shadow-4.1.2.2/man/ru/Makefile.in
    old new  
    192192srcdir = @srcdir@
    193193sysconfdir = @sysconfdir@
    194194target_alias = @target_alias@
     195top_build_prefix = @top_build_prefix@
    195196top_builddir = @top_builddir@
    196197top_srcdir = @top_srcdir@
    197198man_MANS = $(man_nopam) chage.1 chfn.1 chgpasswd.8 chpasswd.8 chsh.1 \
  • man/sv/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/sv/Makefile.in shadow-4.1.2.2/man/sv/Makefile.in
    old new  
    192192srcdir = @srcdir@
    193193sysconfdir = @sysconfdir@
    194194target_alias = @target_alias@
     195top_build_prefix = @top_build_prefix@
    195196top_builddir = @top_builddir@
    196197top_srcdir = @top_srcdir@
    197198man_MANS = chage.1 chfn.1 chgpasswd.8 chpasswd.8 chsh.1 expiry.1 \
  • man/tr/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/tr/Makefile.in shadow-4.1.2.2/man/tr/Makefile.in
    old new  
    188188srcdir = @srcdir@
    189189sysconfdir = @sysconfdir@
    190190target_alias = @target_alias@
     191top_build_prefix = @top_build_prefix@
    191192top_builddir = @top_builddir@
    192193top_srcdir = @top_srcdir@
    193194man_MANS = \
  • man/zh_CN/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/zh_CN/Makefile.in shadow-4.1.2.2/man/zh_CN/Makefile.in
    old new  
    190190srcdir = @srcdir@
    191191sysconfdir = @sysconfdir@
    192192target_alias = @target_alias@
     193top_build_prefix = @top_build_prefix@
    193194top_builddir = @top_builddir@
    194195top_srcdir = @top_srcdir@
    195196man_MANS = \
  • man/zh_TW/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/man/zh_TW/Makefile.in shadow-4.1.2.2/man/zh_TW/Makefile.in
    old new  
    190190srcdir = @srcdir@
    191191sysconfdir = @sysconfdir@
    192192target_alias = @target_alias@
     193top_build_prefix = @top_build_prefix@
    193194top_builddir = @top_builddir@
    194195top_srcdir = @top_srcdir@
    195196man_MANS = \
  • shadow-4.1.2.2

    diff -Naur shadow-4.1.2.2.orig/src/chage.c shadow-4.1.2.2/src/chage.c
    old new  
    759759
    760760        ruid = getuid ();
    761761        rgid = getgid ();
    762         amroot = (ruid == 0);
     762        amroot = 1; /* (ruid == 0); */
    763763#ifdef WITH_SELINUX
    764764        if (amroot && (is_selinux_enabled () > 0)) {
    765765                amroot = (selinux_check_passwd_access (PASSWD__ROOTOK) == 0);
  • shadow-4.1.2.2

    diff -Naur shadow-4.1.2.2.orig/src/chfn.c shadow-4.1.2.2/src/chfn.c
    old new  
    712712
    713713        SYSLOG ((LOG_INFO, "changed user `%s' information", user));
    714714
    715         nscd_flush_cache ("passwd");
     715//      nscd_flush_cache ("passwd");
    716716
    717717#ifdef USE_PAM
    718718        pam_end (pamh, PAM_SUCCESS);
  • src/chgpasswd.c

    diff -Naur shadow-4.1.2.2.orig/src/chgpasswd.c shadow-4.1.2.2/src/chgpasswd.c
    old new  
    487487
    488488        close_files ();
    489489
    490         nscd_flush_cache ("group");
     490//      nscd_flush_cache ("group");
    491491
    492492#ifdef USE_PAM
    493493        pam_end (pamh, PAM_SUCCESS);
  • src/chpasswd.c

    diff -Naur shadow-4.1.2.2.orig/src/chpasswd.c shadow-4.1.2.2/src/chpasswd.c
    old new  
    472472
    473473        close_files ();
    474474
    475         nscd_flush_cache ("passwd");
     475//      nscd_flush_cache ("passwd");
    476476
    477477#ifdef USE_PAM
    478478        pam_end (pamh, PAM_SUCCESS);
  • shadow-4.1.2.2

    diff -Naur shadow-4.1.2.2.orig/src/chsh.c shadow-4.1.2.2/src/chsh.c
    old new  
    5555#include "pam_defs.h"
    5656#endif
    5757#ifndef SHELLS_FILE
    58 #define SHELLS_FILE "/etc/shells"
     58#define SHELLS_FILE SYSCONFDIR"/shells"
    5959#endif
    6060/*
    6161 * Global variables
     
    440440        /*
    441441         * This command behaves different for root and non-root users.
    442442         */
    443         amroot = getuid () == 0;
     443        amroot = 1; /* getuid () == 0; */
    444444
    445445        /*
    446446         * Get the program name. The program name is used as a prefix to
     
    540540
    541541        SYSLOG ((LOG_INFO, "changed user `%s' shell to `%s'", user, loginsh));
    542542
    543         nscd_flush_cache ("passwd");
     543//      nscd_flush_cache ("passwd");
    544544
    545545#ifdef USE_PAM
    546546        pam_end (pamh, PAM_SUCCESS);
  • src/gpasswd.c

    diff -Naur shadow-4.1.2.2.orig/src/gpasswd.c shadow-4.1.2.2/src/gpasswd.c
    old new  
    8181/* The UID of the caller */
    8282static unsigned long bywho = -1;
    8383/* Indicate if gpasswd was called by root */
    84 #define amroot  (0 == bywho)
     84#define amroot  1 /* (0 == bywho) */
    8585
    8686/* The number of retries for th user to provide and repeat a new password */
    8787#ifndef RETRIES
     
    966966         * output, etc.
    967967         */
    968968      output:
     969/*
    969970        if (setuid (0) != 0) {
    970971                fputs (_("Cannot change ID to root.\n"), stderr);
    971972                SYSLOG ((LOG_ERR, "can't setuid(0)"));
     
    976977                closelog ();
    977978                fail_exit (1);
    978979        }
     980*/
    979981        pwd_init ();
    980982
    981983        open_files ();
     
    988990
    989991        close_files ();
    990992
    991         nscd_flush_cache ("group");
     993//      nscd_flush_cache ("group");
    992994
    993995        exit (E_SUCCESS);
    994996}
  • src/groupadd.c

    diff -Naur shadow-4.1.2.2.orig/src/groupadd.c shadow-4.1.2.2/src/groupadd.c
    old new  
    575575        grp_update ();
    576576        close_files ();
    577577
    578         nscd_flush_cache ("group");
     578//      nscd_flush_cache ("group");
    579579
    580580#ifdef USE_PAM
    581581        pam_end (pamh, PAM_SUCCESS);
  • src/groupdel.c

    diff -Naur shadow-4.1.2.2.orig/src/groupdel.c shadow-4.1.2.2/src/groupdel.c
    old new  
    366366
    367367        close_files ();
    368368
    369         nscd_flush_cache ("group");
     369//      nscd_flush_cache ("group");
    370370
    371371#ifdef USE_PAM
    372372        if (retval == PAM_SUCCESS)
  • src/groupmod.c

    diff -Naur shadow-4.1.2.2.orig/src/groupmod.c shadow-4.1.2.2/src/groupmod.c
    old new  
    694694
    695695        close_files ();
    696696
    697         nscd_flush_cache ("group");
     697//      nscd_flush_cache ("group");
    698698
    699699#ifdef USE_PAM
    700700        if (retval == PAM_SUCCESS)
  • shadow-4.1.2.2

    diff -Naur shadow-4.1.2.2.orig/src/grpck.c shadow-4.1.2.2/src/grpck.c
    old new  
    777777        /* Commit the change in the database if needed */
    778778        close_files (changed);
    779779
    780         nscd_flush_cache ("group");
     780//      nscd_flush_cache ("group");
    781781
    782782        /*
    783783         * Tell the user what we did and exit.
  • src/grpconv.c

    diff -Naur shadow-4.1.2.2.orig/src/grpconv.c shadow-4.1.2.2/src/grpconv.c
    old new  
    179179        sgr_unlock ();
    180180        gr_unlock ();
    181181
    182         nscd_flush_cache ("group");
     182//      nscd_flush_cache ("group");
    183183
    184184        return 0;
    185185}
  • src/grpunconv.c

    diff -Naur shadow-4.1.2.2.orig/src/grpunconv.c shadow-4.1.2.2/src/grpunconv.c
    old new  
    142142        sgr_unlock ();
    143143        gr_unlock ();
    144144
    145         nscd_flush_cache ("group");
     145//      nscd_flush_cache ("group");
    146146
    147147        return 0;
    148148}
  • src/login_nopam.c

    diff -Naur shadow-4.1.2.2.orig/src/login_nopam.c shadow-4.1.2.2/src/login_nopam.c
    old new  
    5959
    6060 /* Path name of the access control file. */
    6161#ifndef TABLE
    62 #define TABLE   "/etc/login.access"
     62#define TABLE   SYSCONFDIR"/login.access"
    6363#endif
    6464
    6565/* Delimiters for fields and for lists of users, ttys or hosts. */
  • src/logoutd.c

    diff -Naur shadow-4.1.2.2.orig/src/logoutd.c shadow-4.1.2.2/src/logoutd.c
    old new  
    5050#endif
    5151
    5252#ifndef HUP_MESG_FILE
    53 #define HUP_MESG_FILE "/etc/logoutd.mesg"
     53#define HUP_MESG_FILE SYSCONFDIR"/logoutd.mesg"
    5454#endif
    5555
    5656#if HAVE_UTMPX_H
  • src/Makefile.am

    diff -Naur shadow-4.1.2.2.orig/src/Makefile.am shadow-4.1.2.2/src/Makefile.am
    old new  
    33        .indent.pro
    44
    55ubindir = ${prefix}/bin
    6 usbindir = ${prefix}/sbin
     6usbindir = ${prefix}/bin
    77suidperms = 4755
    88
    99INCLUDES = \
     
    5353LDADD          = $(INTLLIBS) \
    5454                 $(top_builddir)/libmisc/libmisc.a \
    5555                 $(top_builddir)/lib/libshadow.la
    56 AM_CPPFLAGS    = -DLOCALEDIR=\"$(datadir)/locale\"
     56AM_CPPFLAGS    = -DSYSCONFDIR=\"$(sysconfdir)\" -DLOCALEDIR=\"$(datadir)/locale\" -DSG=\"`echo sg | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`\" -DVIGR=\"`echo vigr | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`\"
    5757
    5858chage_LDADD    = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX)
    5959chfn_LDADD     = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT) $(LIBSKEY) $(LIBMD)
     
    9191
    9292install-am: all-am
    9393        $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
    94         ln -sf newgrp   $(DESTDIR)$(ubindir)/sg
    95         ln -sf vipw     $(DESTDIR)$(usbindir)/vigr
     94        ln -sf `echo newgrp | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(ubindir)/`echo sg | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
     95        ln -sf `echo vipw | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(usbindir)/`echo vigr | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
    9696        for i in $(suidbins); do \
    97                 chmod -f $(suidperms) $(DESTDIR)$(bindir)/$$i; \
     97                chmod -f 4755 $(DESTDIR)$(bindir)/`echo $$i | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    9898        done
    9999        for i in $(suidubins); do \
    100                 chmod -f $(suidperms) $(DESTDIR)$(ubindir)/$$i; \
     100                chmod -f 4755 $(DESTDIR)$(ubindir)/`echo $$i | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    101101        done
  • src/Makefile.in

    diff -Naur shadow-4.1.2.2.orig/src/Makefile.in shadow-4.1.2.2/src/Makefile.in
    old new  
    371371srcdir = @srcdir@
    372372sysconfdir = @sysconfdir@
    373373target_alias = @target_alias@
     374top_build_prefix = @top_build_prefix@
    374375top_builddir = @top_builddir@
    375376top_srcdir = @top_srcdir@
    376377EXTRA_DIST = \
    377378        .indent.pro
    378379
    379380ubindir = ${prefix}/bin
    380 usbindir = ${prefix}/sbin
     381usbindir = ${prefix}/bin
    381382suidperms = 4755
    382383INCLUDES = \
    383384        -I${top_srcdir}/lib \
     
    389390                 $(top_builddir)/libmisc/libmisc.a \
    390391                 $(top_builddir)/lib/libshadow.la
    391392
    392 AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\"
     393AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" -DLOCALEDIR=\"$(datadir)/locale\" -DSG=\"`echo sg | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`\" -DVIGR=\"`echo vigr | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`\"
    393394chage_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX)
    394395chfn_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT) $(LIBSKEY) $(LIBMD)
    395396chgpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT)
     
    931932
    932933install-am: all-am
    933934        $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
    934         ln -sf newgrp   $(DESTDIR)$(ubindir)/sg
    935         ln -sf vipw     $(DESTDIR)$(usbindir)/vigr
     935        ln -sf `echo newgrp | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(ubindir)/`echo sg | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
     936        ln -sf `echo vipw | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(usbindir)/`echo vigr | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
    936937        for i in $(suidbins); do \
    937                 chmod -f $(suidperms) $(DESTDIR)$(bindir)/$$i; \
     938                chmod -f 4755 $(DESTDIR)$(bindir)/`echo $$i | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    938939        done
    939940        for i in $(suidubins); do \
    940                 chmod -f $(suidperms) $(DESTDIR)$(ubindir)/$$i; \
     941                chmod -f 4755 $(DESTDIR)$(ubindir)/`echo $$i | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    941942        done
    942943# Tell versions [3.59,3.63) of GNU make to not export all variables.
    943944# Otherwise a system limit (for SysV at least) may be exceeded.
  • shadow-4.1.2.2

    diff -Naur shadow-4.1.2.2.orig/src/newgrp.c shadow-4.1.2.2/src/newgrp.c
    old new  
    270270                if (child < 0) {
    271271                        /* error in fork() */
    272272                        fprintf (stderr, _("%s: failure forking: %s\n"),
    273                                  is_newgrp ? "newgrp" : "sg", strerror (errno));
     273                                 is_newgrp ? "newgrp" : SG, strerror (errno));
    274274#ifdef WITH_AUDIT
    275275                        if (group) {
    276276                                snprintf (audit_buf, sizeof(audit_buf),
     
    387387         */
    388388        Prog = Basename (argv[0]);
    389389        is_newgrp = (strcmp (Prog, "newgrp") == 0);
    390         OPENLOG (is_newgrp ? "newgrp" : "sg");
     390        OPENLOG (is_newgrp ? "newgrp" : SG);
    391391        gid = getgid ();
    392392        argc--;
    393393        argv++;
  • src/newusers.c

    diff -Naur shadow-4.1.2.2.orig/src/newusers.c shadow-4.1.2.2/src/newusers.c
    old new  
    865865
    866866        close_files ();
    867867
    868         nscd_flush_cache ("passwd");
    869         nscd_flush_cache ("group");
     868//      nscd_flush_cache ("passwd");
     869//      nscd_flush_cache ("group");
    870870
    871871#ifdef USE_PAM
    872872        pam_end (pamh, PAM_SUCCESS);
  • shadow-4.1.2.2

    diff -Naur shadow-4.1.2.2.orig/src/passwd.c shadow-4.1.2.2/src/passwd.c
    old new  
    717717         * The program behaves differently when executed by root than when
    718718         * executed by a normal user.
    719719         */
    720         amroot = (getuid () == 0);
     720        amroot = 1; /* (getuid () == 0); */
    721721
    722722        /*
    723723         * Get the program name. The program name is used as a prefix to
     
    998998                exit (E_SUCCESS);
    999999        }
    10001000#endif                          /* USE_PAM */
     1001/*
    10011002        if (setuid (0)) {
    10021003                fputs (_("Cannot change ID to root.\n"), stderr);
    10031004                SYSLOG ((LOG_ERR, "can't setuid(0)"));
    10041005                closelog ();
    10051006                exit (E_NOPERM);
    10061007        }
     1008*/
    10071009        if (spw_file_present ())
    10081010                update_shadow ();
    10091011        else
    10101012                update_noshadow ();
    10111013
    1012         nscd_flush_cache ("passwd");
    1013         nscd_flush_cache ("group");
     1014//      nscd_flush_cache ("passwd");
     1015//      nscd_flush_cache ("group");
    10141016
    10151017        SYSLOG ((LOG_INFO, "password for `%s' changed by `%s'", name, myname));
    10161018        closelog ();
  • shadow-4.1.2.2

    diff -Naur shadow-4.1.2.2.orig/src/pwck.c shadow-4.1.2.2/src/pwck.c
    old new  
    636636
    637637        close_files (changed);
    638638
    639         nscd_flush_cache ("passwd");
     639//      nscd_flush_cache ("passwd");
    640640
    641641        /*
    642642         * Tell the user what we did and exit.
  • shadow-4.1.2.2

    diff -Naur shadow-4.1.2.2.orig/src/pwconv.c shadow-4.1.2.2/src/pwconv.c
    old new  
    208208        spw_unlock ();
    209209        pw_unlock ();
    210210
    211         nscd_flush_cache ("passwd");
     211//      nscd_flush_cache ("passwd");
    212212
    213213        exit (E_SUCCESS);
    214214}
  • src/pwunconv.c

    diff -Naur shadow-4.1.2.2.orig/src/pwunconv.c shadow-4.1.2.2/src/pwunconv.c
    old new  
    149149        spw_unlock ();
    150150        pw_unlock ();
    151151
    152         nscd_flush_cache ("passwd");
     152//      nscd_flush_cache ("passwd");
    153153
    154154        return 0;
    155155}
  • shadow-4.1.2.2

    diff -Naur shadow-4.1.2.2.orig/src/suauth.c shadow-4.1.2.2/src/suauth.c
    old new  
    4040#include "prototypes.h"
    4141
    4242#ifndef SUAUTHFILE
    43 #define SUAUTHFILE "/etc/suauth"
     43#define SUAUTHFILE SYSCONFDIR"/suauth"
    4444#endif
    4545
    4646#define NOACTION        0
  • src/useradd.c

    diff -Naur shadow-4.1.2.2.orig/src/useradd.c shadow-4.1.2.2/src/useradd.c
    old new  
    6464#include "shadowio.h"
    6565
    6666#ifndef SKEL_DIR
    67 #define SKEL_DIR "/etc/skel"
     67#define SKEL_DIR SYSCONFDIR"/skel"
    6868#endif
    6969#ifndef USER_DEFAULTS_FILE
    70 #define USER_DEFAULTS_FILE "/etc/default/useradd"
    71 #define NEW_USER_FILE "/etc/default/nuaddXXXXXX"
     70#define USER_DEFAULTS_FILE SYSCONFDIR"/default/useradd"
     71#define NEW_USER_FILE SYSCONFDIR"/default/nuaddXXXXXX"
    7272#endif
    7373/*
    7474 * Needed for MkLinux DR1/2/2.1 - J.
     
    17511751
    17521752        close_files ();
    17531753
    1754         nscd_flush_cache ("passwd");
    1755         nscd_flush_cache ("group");
     1754//      nscd_flush_cache ("passwd");
     1755//      nscd_flush_cache ("group");
    17561756
    17571757#ifdef USE_PAM
    17581758        if (retval == PAM_SUCCESS)
  • src/userdel.c

    diff -Naur shadow-4.1.2.2.orig/src/userdel.c shadow-4.1.2.2/src/userdel.c
    old new  
    818818        user_cancel (user_name);
    819819        close_files ();
    820820
    821         nscd_flush_cache ("passwd");
    822         nscd_flush_cache ("group");
     821//      nscd_flush_cache ("passwd");
     822//      nscd_flush_cache ("group");
    823823
    824824#ifdef USE_PAM
    825825        if (retval == PAM_SUCCESS)
  • src/usermod.c

    diff -Naur shadow-4.1.2.2.orig/src/usermod.c shadow-4.1.2.2/src/usermod.c
    old new  
    15311531                grp_update ();
    15321532        close_files ();
    15331533
    1534         nscd_flush_cache ("passwd");
    1535         nscd_flush_cache ("group");
     1534//      nscd_flush_cache ("passwd");
     1535//      nscd_flush_cache ("group");
    15361536
    15371537        if (mflg)
    15381538                move_home ();
  • shadow-4.1.2.2

    diff -Naur shadow-4.1.2.2.orig/src/vipw.c shadow-4.1.2.2/src/vipw.c
    old new  
    257257        textdomain (PACKAGE);
    258258
    259259        progname = ((a = strrchr (*argv, '/')) ? a + 1 : *argv);
    260         do_vipw = (strcmp (progname, "vigr") != 0);
     260        do_vipw = (strcmp (progname, VIGR) != 0);
    261261
    262262        {
    263263                /*
     
    334334#endif
    335335        }
    336336
    337         nscd_flush_cache ("passwd");
    338         nscd_flush_cache ("group");
     337//      nscd_flush_cache ("passwd");
     338//      nscd_flush_cache ("group");
    339339
    340340        exit (E_SUCCESS);
    341341}
Note: See TracBrowser for help on using the repository browser.