Changeset 111 for trunk


Ignore:
Timestamp:
Jul 7, 2007, 9:18:46 PM (17 years ago)
Author:
rainer
Message:

Fix for ticket #69 (wrappers for name service routines not used everywhere).

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.in

    r109 r111  
    16801680yulectl.o: $(srcsrc)/yulectl.c Makefile config_xor.h
    16811681sh_mounts.o: $(srcsrc)/sh_mounts.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_mounts.h
    1682 sh_userfiles.o: $(srcsrc)/sh_userfiles.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_modules.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_utils.h $(srcinc)/sh_schedule.h $(srcinc)/sh_error.h $(srcinc)/sh_hash.h $(srcinc)/sh_files.h
     1682sh_userfiles.o: $(srcsrc)/sh_userfiles.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_modules.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_utils.h $(srcinc)/sh_schedule.h $(srcinc)/sh_error.h $(srcinc)/sh_hash.h $(srcinc)/sh_files.h $(srcinc)/sh_static.h
    16831683sh_prelude.o: $(srcsrc)/sh_prelude.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_cat.h $(srcinc)/sh_error_min.h $(srcinc)/sh_prelude.h
    16841684kern_head.o: $(srcsrc)/kern_head.c Makefile config.h $(srcinc)/kern_head.h $(srcinc)/kern_head.h
  • trunk/depend.dep

    r109 r111  
    5454yulectl.o: $(srcsrc)/yulectl.c Makefile config_xor.h
    5555sh_mounts.o: $(srcsrc)/sh_mounts.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_mounts.h
    56 sh_userfiles.o: $(srcsrc)/sh_userfiles.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_modules.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_utils.h $(srcinc)/sh_schedule.h $(srcinc)/sh_error.h $(srcinc)/sh_hash.h $(srcinc)/sh_files.h
     56sh_userfiles.o: $(srcsrc)/sh_userfiles.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_modules.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_utils.h $(srcinc)/sh_schedule.h $(srcinc)/sh_error.h $(srcinc)/sh_hash.h $(srcinc)/sh_files.h $(srcinc)/sh_static.h
    5757sh_prelude.o: $(srcsrc)/sh_prelude.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_cat.h $(srcinc)/sh_error_min.h $(srcinc)/sh_prelude.h
    5858sh_prelink.o: $(srcsrc)/sh_prelink.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_extern.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h
  • trunk/depend.sum

    r109 r111  
    1 4114523250
     11096789008
  • trunk/docs/Changelog

    r110 r111  
     12.3.6:
     2        * sh_gpg.c, sh_userfiles.c: use sh_getpwnam et al. wrappers
     3
    142.3.5:
    25        * sh_portcheck.c: try to tear down connections more gracefully
  • trunk/include/sh_static.h

    r1 r111  
    3333#define sh_getpwuid   getpwuid
    3434#define sh_endpwent   endpwent
     35#define sh_setpwent   setpwent
    3536
    3637#define sh_gethostbyaddr gethostbyaddr
  • trunk/src/sh_gpg.c

    r102 r111  
    292292      struct stat lbuf;
    293293      int         status_stat = 0;
    294       struct passwd * tempres = getpwnam(DEFAULT_IDENT);
    295       if (!tempres)
    296         tempres = sh_getpwnam(DEFAULT_IDENT);
     294      struct passwd * tempres = sh_getpwnam(DEFAULT_IDENT);
     295
    297296      if (!tempres)
    298297        {
     
    953952      TPT(((0), FIL__, __LINE__, _("msg=<GPG_CHECK: FD1 = %d>\n"), fd1));
    954953#if defined(SH_WITH_SERVER)
    955       tempres = getpwnam(DEFAULT_IDENT);
    956       if (!tempres)
    957         tempres = sh_getpwnam(DEFAULT_IDENT);
     954      tempres = sh_getpwnam(DEFAULT_IDENT);
     955
    958956      if ((tempres != NULL) && (0 == sl_ret_euid()))
    959957        {
     
    971969      TPT(((0), FIL__, __LINE__, _("msg=<GPG_CHECK: FD2 = %d>\n"), fd2));
    972970#if defined(SH_WITH_SERVER)
    973       tempres = getpwnam(DEFAULT_IDENT);
    974       if (!tempres)
    975         tempres = sh_getpwnam(DEFAULT_IDENT);
     971      tempres = sh_getpwnam(DEFAULT_IDENT);
     972
    976973      if ((tempres != NULL) && (0 == sl_ret_euid()))
    977974        {
     
    10801077
    10811078#if defined(SH_WITH_SERVER)
    1082       struct passwd * e_tempres = getpwnam(DEFAULT_IDENT);
    1083       if (!e_tempres)
    1084         e_tempres = sh_getpwnam(DEFAULT_IDENT);
     1079      struct passwd * e_tempres = sh_getpwnam(DEFAULT_IDENT);
     1080
    10851081      if ((e_tempres != NULL) && (0 == sl_ret_euid()))   
    10861082        {
  • trunk/src/sh_userfiles.c

    r68 r111  
    3939#include "sh_hash.h"
    4040#include "sh_files.h"
     41#define SH_NEED_PWD_GRP 1
     42#include "sh_static.h"
    4143
    4244#ifdef SH_USE_USERFILES
     
    266268     * getpwent() too */
    267269    /*@-unrecog@*/
    268     setpwent();
     270    sh_setpwent();
    269271    /*@+unrecog@*/
    270     while( ( cur_user = /*@-unrecog@*/getpwent()/*@+unrecog@*/ ) != NULL ) {
     272    while( ( cur_user = /*@-unrecog@*/sh_getpwent()/*@+unrecog@*/ ) != NULL ) {
    271273        int found = 0;
    272274
  • trunk/src/trustfile.c

    r76 r111  
    429429          /* map user name to UID and compare */
    430430#ifdef TRUST_MAIN
    431           if ((w = getpwnam(*p)) != NULL && *u == (uid_t)(w->pw_uid) )
     431          if ((w = sh_getpwnam(*p)) != NULL && *u == (uid_t)(w->pw_uid) )
    432432            SL_IRETURN(SL_TRUE, _("isingrp"));
    433433#else
     
    445445    {
    446446#ifdef TRUST_MAIN
    447       if ((w = getpwuid(*u)) != NULL && grp == (gid_t)(w->pw_gid) )
     447      if ((w = sh_getpwuid(*u)) != NULL && grp == (gid_t)(w->pw_gid) )
    448448        SL_IRETURN(SL_TRUE, _("isingrp"));
    449449#else
     
    961961  tf_path[0] = '\0';
    962962#if defined(SH_WITH_SERVER)
    963   pass = getpwnam(SH_IDENT);
     963  pass = sh_getpwnam(SH_IDENT);
    964964  if (pass != NULL)
    965965    tf_euid = pass->pw_uid;
Note: See TracChangeset for help on using the changeset viewer.