Changeset 20041


Ignore:
Timestamp:
2010-03-07T19:43:51+01:00 (8 years ago)
Author:
florian
Message:

[packages] fix samba3 logging in nmbd when CONFIG_SAMBA3_DEBUG is enabled (#6389)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/samba3/patches/100-avm.patch

    r18991 r20041  
    72237223+ 
    72247224+#endif /*  _NTLM_AUTH_PROTO_H_  */ 
     7225diff -urN samba-3.0.24/source/nmbd/nmbd.c samba-3.0.24.new/source/nmbd/nmbd.c 
     7226--- samba-3.0.24/source/nmbd/nmbd.c     2007-02-04 19:59:23.000000000 +0100 
     7227+++ samba-3.0.24.new/source/nmbd/nmbd.c 2010-03-07 19:33:23.000000000 +0100 
     7228@@ -23,6 +23,39 @@ 
     7229  
     7230 #include "includes.h" 
     7231  
     7232+#ifdef SAMBA_DEBUG 
     7233+void _fLog(char *fmt, ...) 
     7234+{ 
     7235+        va_list va; 
     7236+        FILE *fp = fopen("/var/tmp/smbd.log", "a"); 
     7237+        time_t t = time(0); /* LOG */ 
     7238+ 
     7239+        if (!fp) return; 
     7240+ 
     7241+        fprintf(fp, " [%d] %02u:%02u  ", getpid(), (t / 60) % 60, t % 60); 
     7242+        va_start(va, fmt); 
     7243+        vfprintf(fp, fmt, va); 
     7244+        va_end(va); 
     7245+        fprintf(fp, "\n"); 
     7246+        fclose(fp); 
     7247+} 
     7248+ 
     7249+void _fDebug(char *fmt, ...) 
     7250+{ 
     7251+        va_list va; 
     7252+        FILE *fp = fopen("/var/tmp/smbd.log", "a"); 
     7253+        time_t t = time(0); /* LOG */ 
     7254+ 
     7255+        if (!fp) return; 
     7256+ 
     7257+        fprintf(fp, " [%d] %02u:%02u ", getpid(), (t / 60) % 60, t % 60); 
     7258+        va_start(va, fmt); 
     7259+        vfprintf(fp, fmt, va); 
     7260+        va_end(va); 
     7261+        fclose(fp); 
     7262+} 
     7263+#endif 
     7264+ 
     7265 int ClientNMB       = -1; 
     7266 int ClientDGRAM     = -1; 
     7267 int global_nmb_port = -1; 
Note: See TracChangeset for help on using the changeset viewer.