Changeset 108


Ignore:
Timestamp:
Jun 18, 2007, 8:54:05 PM (18 years ago)
Author:
rainer
Message:

Patch for sh_prelude (deinit, exit on failure if daemon), as requested by Yoann V.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.in

    r101 r108  
    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
    16821682sh_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
    1683 sh_prelude.o: $(srcsrc)/sh_prelude.c Makefile config_xor.h $(srcinc)/slib.h $(srcinc)/sh_cat.h $(srcinc)/sh_error_min.h $(srcinc)/sh_prelude.h
     1683sh_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
    16851685sh_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.dep

    r79 r108  
    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
    5656sh_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
    57 sh_prelude.o: $(srcsrc)/sh_prelude.c Makefile config_xor.h $(srcinc)/slib.h $(srcinc)/sh_cat.h $(srcinc)/sh_error_min.h $(srcinc)/sh_prelude.h
     57sh_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
    5959sh_static.o: $(srcsrc)/sh_static.c Makefile config_xor.h
  • trunk/depend.sum

    r79 r108  
    1 554998806
     13139738957
  • trunk/src/sh_prelude.c

    r106 r108  
    7979 * includes for samhain-specific functions (sl_strstr, sh_error_handle)
    8080 */
    81 #include "slib.h"
     81#include "samhain.h"
    8282#include "sh_cat.h"
    8383#include "sh_error_min.h"
     
    984984        if (initialized < 1)
    985985                return;
    986         prelude_client_destroy(client, PRELUDE_CLIENT_EXIT_STATUS_SUCCESS);
     986
     987        if (sh.flag.isdaemon == S_TRUE)
     988                prelude_client_destroy(client, PRELUDE_CLIENT_EXIT_STATUS_FAILURE);
     989        else
     990                prelude_client_destroy(client, PRELUDE_CLIENT_EXIT_STATUS_SUCCESS);
     991
    987992        client = NULL;
     993
     994        prelude_deinit();
     995
    988996        initialized = 0;
    989997        return;
Note: See TracChangeset for help on using the changeset viewer.