Re: Re: CLOSED - Re: [users@httpd] Macros + Require constructs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2016-06-18 12:04 PM, @lbutlr wrote:
On Jun 16, 2016, at 8:56 PM, John Allen <john@xxxxxxx> wrote:
On 2016-06-15 11:52 PM, John Allen wrote:
I just did some testing and it doesn't work as I had hoped. the Require valid-user is applied in all cases not just in the case of the Common space!

I had tried

<RequireAny>
         <RequireAll>
                     Require expr %Location =~ "Common"
                     Require valid-user
         </RequireAll>
         Require user %user
</RequirwAny>

But it did not work. What Am I missing?
I found a solution to the problem, not quite how I wanted to do things but it works.
Is it a secret solution?

No. I just did not think it was important enough to publish, sorry. So my macro now looks like this:

<Macro WebDav_User %location %user>
# %location
    Alias /%location /srv/webdav/data/%location
    <Directory /srv/webdav/data/%location>
        DAV On
        Options +Indexes +MultiViews +FollowSymLinks
        IndexOptions -IconsAreLinks +NameWidth=* +FancyIndexing +FoldersFirst +HTMLTable

        IndexOrderDefault Ascending Name
        DirectoryIndex disabled
        AllowOverride None
        DavDepthInfinity on
        DavMinTimeout 600

        AuthType Digest
        AuthName "webdav"
        AuthDigestProvider socache file
        AuthUserFile /srv/webdav/auth.d/digest_pw
        AuthnCacheProvideFor file
        AuthnCacheTimeout 600
        AuthnCacheContext webdav
        <RequireAny>
            <RequireAll>
                Require expr %{REQUEST_URI} =~ m#^/Common#
                Require valid-user
            </RequireAll>
            <RequireAll>
                Require user %user
            </RequireAll>
        </RequireAny>
    </Directory>
</Macro>

Interestingly, without the RequireAll around the "Require user %user" it does not work.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux