Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • unix.c

    raaf92a9 r60c1a4e  
    3434#include <sys/time.h>
    3535#include <sys/wait.h>
    36 #include <pwd.h>
    3736
    3837global_t global;        /* Against global namespace pollution */
     
    4645        struct sigaction sig, old;
    4746       
     47        memset( &global, 0, sizeof( global_t ) );
     48       
    4849        log_init();
    4950        CONF_FILE = g_strdup( CONF_FILE_DEF );
     
    8687                return( i );
    8788       
    88         if( ( global.conf->user && *global.conf->user ) &&
    89             ( global.conf->runmode == RUNMODE_DAEMON ||
    90               global.conf->runmode == RUNMODE_FORKDAEMON ) &&
    91             ( !getuid() || !geteuid() ) )
    92         {
    93                 struct passwd *pw = NULL;
    94                 pw = getpwnam( global.conf->user );
    95                 if( pw )
    96                 {
    97                         setgid( pw->pw_gid );
    98                         setuid( pw->pw_uid );
    99                 }
    100         }
    101 
    10289        global.storage = storage_init( global.conf->primary_storage, global.conf->migrate_storage );
    103         if( global.storage == NULL )
    104         {
     90        if ( global.storage == NULL) {
    10591                log_message( LOGLVL_ERROR, "Unable to load storage backend '%s'", global.conf->primary_storage );
    10692                return( 1 );
    10793        }
     94       
    10895       
    10996        /* Catch some signals to tell the user what's happening before quitting */
Note: See TracChangeset for help on using the changeset viewer.