Discussion:
[ProFTPD-committers] [Bug 3576] Support setting CapabilitiesSet on per-user basis via mod_ifsession's <IfUser> and <IfGroup>
(too old to reply)
b***@horde.net
2011-01-13 21:50:27 UTC
Permalink
http://bugs.proftpd.org/show_bug.cgi?id=3576





--- Comment #1 from TJ Saunders <***@castaglia.org> 2011-01-13 16:50:26 ---
This is not going to be as straightforward a change as I had hoped.

The issue is that both the mod_cap and mod_ifsession modules have POST_CMD
phase handlers for the PASS command. In order for mod_ifsession's merging of
directives (and thus to support the requested functionality), its POST_CMD
handler needs to run before mod_cap's POST_CMD handler.

The order in which command handlers are run depends on the module load order:
last module loaded, first module in dispatch chain.

The mod_cap module is *automatically* added to the list of modules by proftpd's
configure script, when it detects linuxprivs/capabilities support in the host.
This automatic enabling means that mod_cap will always end up after
mod_ifsession in the module load order -- and thus means that mod_cap's
POST_CMD handler for the PASS command will run before mod_ifsession.

This could all be handled easily for DSO/shared modules -- except that the
configure script does not allow the mod_cap module to be built as a shared
module. (Probably because it *is* auto-enabled, and the script would need to
know whether to autoenable it as a static or a shared module.)

One possibility is to modify the configure script to always make sure that
mod_ifsession, if it appears in the static module list, is always last,
regardless of anything else. I don't think this would break any existing
configs, and it would ensure that The Right Thing(tm) is always done for
mod_ifsession (rather than having to remind people to do this).
--
Configure bugmail: http://bugs.proftpd.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
b***@horde.net
2011-01-14 19:42:22 UTC
Permalink
http://bugs.proftpd.org/show_bug.cgi?id=3576





--- Comment #2 from TJ Saunders <***@castaglia.org> 2011-01-14 14:42:21 ---
Hmm. Here's an interesting wrinkle: what if an admin compiles proftpd using a
shared mod_ifsession module? The mod_cap module will currently be
automatically added as a static module. So what would the module load order be
when mod_cap is static, and mod_ifsession is shared?
--
Configure bugmail: http://bugs.proftpd.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
b***@horde.net
2011-02-20 17:15:33 UTC
Permalink
http://bugs.proftpd.org/show_bug.cgi?id=3576

TJ Saunders <***@castaglia.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED

--- Comment #3 from TJ Saunders <***@castaglia.org> 2011-02-20 12:15:31 EST ---
I've modified the configure script in CVS such that mod_ifsession, if it
appears in the --with-modules list, will always be put at the end of the static
module list. If it appears within the --with-shared list, then it will be up
to the admin to configure the LoadModule directive in the proper order.
--
Configure bugmail: http://bugs.proftpd.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
b***@horde.net
2011-02-28 18:24:16 UTC
Permalink
http://bugs.proftpd.org/show_bug.cgi?id=3576

--- Comment #4 from TJ Saunders <***@castaglia.org> 2011-02-28 13:24:14 EST ---
Created attachment 3559
--> http://bugs.proftpd.org/attachment.cgi?id=3559
Adds requested functionality

The configure script in CVS has been updated to impose the correct module load
order for the mod_cap and mod_ifsession modules in order to support this use
case.

The attached patch for mod_cap implements the support requested.
--
Configure bugmail: http://bugs.proftpd.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
b***@horde.net
2011-02-28 18:27:33 UTC
Permalink
http://bugs.proftpd.org/show_bug.cgi?id=3576

TJ Saunders <***@castaglia.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED

--- Comment #5 from TJ Saunders <***@castaglia.org> 2011-02-28 13:27:32 EST ---
Patch committed to CVS with accompanying unit test.
--
Configure bugmail: http://bugs.proftpd.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
b***@horde.net
2011-04-06 07:31:59 UTC
Permalink
http://bugs.proftpd.org/show_bug.cgi?id=3576

TJ Saunders <***@castaglia.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED

--- Comment #6 from TJ Saunders <***@castaglia.org> 2011-04-06 03:31:59 EDT ---
Resolved in 1.3.4rc2.
--
Configure bugmail: http://bugs.proftpd.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
Loading...