Ignore:
Timestamp:
Aug 12, 2016, 12:48:26 AM (9 years ago)
Author:
dmik
Message:

samba server: Make nmbd obey max log size setting.

This is sorta backport from Samba 4 by @diver (to make sure
the manually set log file name is not changed when smb.conf
is loaded) with some additions that cause max log size
to be taken into account.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/lib/popt_common.c

    r745 r952  
    4040extern bool override_logfile;
    4141
     42#ifdef __OS2__
     43static void set_logfile(poptContext con, const char * arg, bool setcmdline)
     44#else
    4245static void set_logfile(poptContext con, const char * arg)
     46#endif
    4347{
    4448
     
    5862        }
    5963        lp_set_logfile(lfile);
     64#ifdef __OS2__
     65        if (setcmdline) {
     66                lp_set_cmdline("log file", lfile);
     67        }
     68#endif
     69
    6070        SAFE_FREE(lfile);
    6171}
     
    7585
    7686        if (reason == POPT_CALLBACK_REASON_PRE) {
     87#ifdef __OS2__
     88                set_logfile(con, get_dyn_LOGFILEBASE(), false);
     89#else
    7790                set_logfile(con, get_dyn_LOGFILEBASE());
     91#endif
    7892                talloc_set_log_fn(popt_s3_talloc_log_fn);
    7993                talloc_set_abort_fn(smb_panic);
     
    136150        case 'l':
    137151                if (arg) {
     152#ifdef __OS2__
     153                        set_logfile(con, arg, true);
     154#else
    138155                        set_logfile(con, arg);
     156#endif
    139157                        override_logfile = True;
    140158                        set_dyn_LOGFILEBASE(arg);
Note: See TracChangeset for help on using the changeset viewer.