[prev in list] [next in list] [prev in thread] [next in thread] 

List:       proftpd-committers
Subject:    [ProFTPD-committers] proftpd/modules mod_log.c,1.142,1.143
From:       TJ Saunders <castaglia () users ! sourceforge ! net>
Date:       2013-03-16 4:45:29
Message-ID: E1UGizr-0008GE-Cj () sfs-ml-1 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Update of /cvsroot/proftp/proftpd/modules
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv26355/modules

Modified Files:
	mod_log.c 
Log Message:

Bug#3864 - Support SQL query to lookup/use primary key for logged-in user/group.


Index: mod_log.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/modules/mod_log.c,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -d -r1.142 -r1.143
--- mod_log.c	31 Jan 2013 17:38:56 -0000	1.142
+++ mod_log.c	16 Mar 2013 04:45:27 -0000	1.143
@@ -112,6 +112,7 @@
 #define META_MICROSECS		40
 #define META_MILLISECS		41
 #define META_ISO8601		42
+#define META_GROUP		43
 
 /* For tracking the size of deleted files. */
 static off_t log_dele_filesz = 0;
@@ -133,6 +134,7 @@
    %{FOOBAR}e		- Contents of environment variable FOOBAR
    %F			- Transfer path (filename for client)
    %f			- Filename
+   %g			- Local user's primary group name
    %H                   - Local IP address of server handling session
    %h			- Remote client DNS name
    %I                   - Total number of "raw" bytes read in from network
@@ -358,6 +360,10 @@
             add_meta(&outs, META_XFER_PATH, 0);
             break;
 
+          case 'g':
+            add_meta(&outs, META_GROUP, 0);
+            break;
+
           case 'H':
             add_meta(&outs, META_VHOST_IP, 0);
             break;
@@ -1215,6 +1221,19 @@
       break;
     }
 
+    case META_GROUP:
+      argp = arg;
+
+      if (session.group != NULL) {
+        sstrncpy(argp, session.group, sizeof(arg));
+
+      } else {
+        sstrncpy(argp, "-", sizeof(arg));
+      }
+
+      m++;
+      break;
+
     case META_RESPONSE_CODE: {
       char *resp_code = NULL;
       int res;


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
ProFTPD Committers Mailing List
proftpd-committers@proftpd.org
https://lists.sourceforge.net/lists/listinfo/proftp-committers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic