Ignore:
Timestamp:
Feb 24, 2014, 5:43:22 PM (11 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.6: seperate logfiles per pid in nmbd and also take smb.conf into account

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/nmbd/nmbd.c

    r854 r855  
    399399        /* restore the logfile to log.nmbd always */
    400400        char *lfile = NULL;
    401         if (asprintf(&lfile, "%s/log%d.nmbd", get_dyn_LOGFILEBASE(), getpid()) < 0)
     401        if (asprintf(&lfile, "%s/log.nmbd.%d", get_dyn_LOGFILEBASE(), getpid()) < 0)
    402402                exit(1);
    403403
     
    841841        if (!override_logfile) {
    842842                char *lfile = NULL;
    843                 if (asprintf(&lfile, "%s/log%d.nmbd", get_dyn_LOGFILEBASE(), getpid()) < 0) {
     843                if (asprintf(&lfile, "%s/log.nmbd", get_dyn_LOGFILEBASE()) < 0) {
    844844                        exit(1);
    845845                }
     
    894894                exit(1);
    895895        }
     896
     897#ifdef __OS2__
     898        /* restore the logfile to log.nmbd always and also use smb.conf settings*/
     899        char *lfile = NULL;
     900        if (asprintf(&lfile, "%s/log.nmbd.%d", get_dyn_LOGFILEBASE(), getpid()) < 0)
     901                exit(1);
     902
     903        lp_set_logfile(lfile);
     904        SAFE_FREE(lfile);
     905
     906        reopen_logs();
     907#endif
    896908
    897909        if (nmbd_messaging_context() == NULL) {
Note: See TracChangeset for help on using the changeset viewer.