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

List:       proftpd-users
Subject:    [Proftpd-user] Another patch for mod_exec
From:       Andreas Pardeike <ap () fsys ! se>
Date:       2007-01-17 13:21:05
Message-ID: B6EBF846-95BA-4774-9F07-3B5A7E65AB0B () fsys ! se
[Download RAW message or body]

Me again,

just discovered that I also patched mod_exec. I know that it's not
recommended and not part of the default distribution but I would
like to share it anyway:

1539c1539,1541
<     if (session.xfer.p && session.xfer.path) {
---
 >     if (!strcmp(cmd->argv[0], C_RNTO)) {
 >       sstrncpy(arg, dir_abs_path(cmd->tmp_pool, cmd->arg, TRUE),  
sizeof(arg));
 >     } else if (session.xfer.p && session.xfer.path) {

This is found in exec_subst_var() inside   if (strstr("%f", varstr))...

Same reason as the previous patch. I use it to move uploaded files once
they are uploaded. But the script does not get the path if the client  
first
uploads into a directory where files are affected (the script decides  
which
folders it wants files to be moved from) and then only moves them to the
folder where files will get moved. After the patch the RNTO command will
contain the destination path as a parameter.

Any comments welcome,
Andreas Pardeike

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
ProFTPD Users List   <proftpd-users@proftpd.org>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
[prev in list] [next in list] [prev in thread] [next in thread] 

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