Re: [gentoo-user] meet compile error when install firefox-78.5.0

2020-11-30 Thread Michael
On Monday, 30 November 2020 05:14:06 GMT bobwxc wrote:
> Hi all,
> 
> I meet a error when install firefox-78.5.0

A page or two above "Error 2" you included in your terminal output, emerge 
will have also printed the first error it encountered in compiling Firefox.  
Can you share that?



signature.asc
Description: This is a digitally signed message part.


Re: Re: [gentoo-user] meet compile error when install firefox-78.5.0

2020-11-30 Thread bobwxc
I  searched  the  build.log  and  find out  the  2  errors,  hope  usefull   :  
)




102:54.55 
/var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/include/nsTArray.h:2780:7:
 required from 'CopyableTArr

ay& CopyableTArray::operator=(const CopyableTArray&) [with E = 
mozilla::dom::workerinternals::JSSettings::JSGCSetting]'

8102:54.55 
/var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/include/mozilla/dom/workerinternals/JSSettings.h:26:8:

required from here

102:54.55 
/var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/include/nsTArray.h:645:13:
 warning: 'void* memcpy(void*,

const void*, size_t)' writing to an object of non-trivially copyable type 
'struct mozilla::dom::workerinternals::JSSettings::JSGCSett

ing'; use copy-assignment or copy-initialization instead [-Wclass-memaccess]

102:54.55 645 | memcpy(aElements + aStart, aValues, aCount * sizeof(ElemType));

102:54.55| 
~~^~~~

102:54.55 In file included from 
/var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/include/mozilla/dom/WorkerPrivate.

h:35,

102:54.55 from 
/var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/include/mozilla/dom/WorkerLocation

.h:11,

102:54.55 from WorkerGlobalScopeBinding.cpp:25,

102:54.55 from UnifiedBindings23.cpp:327:

102:54.55 
/var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/include/mozilla/dom/workerinternals/JSSettings.h:27:10:

note: 'struct mozilla::dom::workerinternals::JSSettings::JSGCSetting' declared 
here

102:54.55 27 | struct JSGCSetting {

102:54.55  | ^~~

102:54.55 x86_64-pc-linux-gnu-g++: fatal error: Killed signal terminated 
program cc1plus

102:54.55 compilation terminated.

102:54.55 gmake[4]: *** 
[/var/tmp/portage/www-client/firefox-78.5.0/work/firefox-78.5.0/config/rules.mk:748:
 UnifiedBindings23.o] Err

or 1

102:54.56 gmake[4]: *** Deleting file 'UnifiedBindings23.o'

102:54.62 gmake[4]: Leaving directory 
'/var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dom/bindings'

102:54.62 gmake[3]: *** 
[/var/tmp/portage/www-client/firefox-78.5.0/work/firefox-78.5.0/config/recurse.mk:74:
 dom/bindings/target-obj

ects] Error 2

102:54.62 gmake[3]: *** Waiting for unfinished jobs

102:55.30 dom/events/Unified_cpp_dom_events2.o

102:55.59 /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -std=gnu++17 -o 
Unified_cpp_dom_events1.o -c 
-I/var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/stl_wrappers
 
-I/var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/system_wrappers
 :



> -- 原始邮件 --
> 发 件 人:Michael 
> 发送时间:2020-11-30 17:00:17
> 收 件 人:gentoo-user@lists.gentoo.org
> 抄 送:
> 主 题:Re: [gentoo-user] meet compile error when install firefox-78.5.0
>
> On Monday, 30 November 2020 05:14:06 GMT bobwxc wrote:
> > Hi all,
> >
> > I meet a error when install firefox-78.5.0
>
> A page or two above "Error 2" you included in your terminal output, emerge
> will have also printed the first error it encountered in compiling Firefox.
> Can you share that?
>
























Re: [gentoo-user] meet compile error when install firefox-78.5.0

2020-11-30 Thread Michael
On Monday, 30 November 2020 09:24:02 GMT bobwxc wrote:
> I  searched  the  build.log  and  find out  the  2  errors,  hope  usefull  
> :  )
> 
> 
> 
> 
> 102:54.55
> /var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/include/
> nsTArray.h:2780:7: required from 'CopyableTArr
> 
> ay& CopyableTArray::operator=(const CopyableTArray&) [with E =
> mozilla::dom::workerinternals::JSSettings::JSGCSetting]'
> 
> 8102:54.55
> /var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/include/
> mozilla/dom/workerinternals/JSSettings.h:26:8:
> 
> required from here
> 
> 102:54.55
> /var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/include/
> nsTArray.h:645:13: warning: 'void* memcpy(void*,
> 
> const void*, size_t)' writing to an object of non-trivially copyable type
> 'struct mozilla::dom::workerinternals::JSSettings::JSGCSett
> 
> ing'; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
> 
> 102:54.55 645 | memcpy(aElements + aStart, aValues, aCount *
> sizeof(ElemType));
> 
> 102:54.55|
> ~~^~~~
> 
> 102:54.55 In file included from
> /var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/include/
> mozilla/dom/WorkerPrivate.
> 
> h:35,
> 
> 102:54.55 from
> /var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/include/
> mozilla/dom/WorkerLocation
> 
> .h:11,
> 
> 102:54.55 from WorkerGlobalScopeBinding.cpp:25,
> 
> 102:54.55 from UnifiedBindings23.cpp:327:
> 
> 102:54.55
> /var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dist/include/
> mozilla/dom/workerinternals/JSSettings.h:27:10:
> 
> note: 'struct mozilla::dom::workerinternals::JSSettings::JSGCSetting'
> declared here
> 
> 102:54.55 27 | struct JSGCSetting {
> 
> 102:54.55  | ^~~
> 
> 102:54.55 x86_64-pc-linux-gnu-g++: fatal error: Killed signal terminated
> program cc1plus
> 
> 102:54.55 compilation terminated.
> 
> 102:54.55 gmake[4]: ***
> [/var/tmp/portage/www-client/firefox-78.5.0/work/firefox-78.5.0/config/rule
> s.mk:748: UnifiedBindings23.o] Err
> 
> or 1
> 
> 102:54.56 gmake[4]: *** Deleting file 'UnifiedBindings23.o'
> 
> 102:54.62 gmake[4]: Leaving directory
> '/var/tmp/portage/www-client/firefox-78.5.0/work/firefox_build/dom/bindings
> '
> 
> 102:54.62 gmake[3]: ***
> [/var/tmp/portage/www-client/firefox-78.5.0/work/firefox-78.5.0/config/recu
> rse.mk:74: dom/bindings/target-obj
> 
> ects] Error 2
> 
> 102:54.62 gmake[3]: *** Waiting for unfinished jobs
> 
> 102:55.30 dom/events/Unified_cpp_dom_events2.o
> 
> 102:55.59 /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -std=gnu++17 -o 
Unified_cpp_dom_events1.o -c -I/var/tmp/portage/www-client/firefox-78.5.0/
work/firefox_build/dist/stl_wrappers -I/var/tmp/portage/www-client/
firefox-78.5.0/work/firefox_build/dist/system_wrappers :

I'm not sure of what may be causing this firefox error, but someone else 
should be able to chime in.  Until they do, you could first check dmesg to 
make sure you're not running out of memory, then you could update your 
@system, before you try again to emerge firefox like so: 

MAKEOPTS="-j1" emerge -uaNDv --with-bdeps=y firefox

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] apache 2.4 - deny access to directory

2020-11-30 Thread Michael
On Sunday, 29 November 2020 18:22:09 GMT the...@sys-concept.com wrote:
> Thelma
> 
> On 11/29/2020 03:22 AM, Michael wrote:
> > On Sunday, 29 November 2020 07:30:16 GMT the...@sys-concept.com wrote:
> >> I'm trying to deny access to all except specific IP address in a
> >> directory, just testing it.
> >> 
> >> In modules.d/00_default_settings.conf
> >> 
> >> 
> >> 
> >>Options MultiViews
> >>AllowOverride All
> >>Require all granted
> >> 
> >> 
> >> 
> >> in admin/.htaccess
> >> 
> >> 
> >> 
> >> Require all denied
> >> Require ip 10.0.0.100
> >> 
> >> 
> >> 
> >> My IP is 10.0.0.112 and I can still access the server /admin directory
> >> 
> >> What am I missing?
> > 
> > In apache 2.4 the access control syntax has changed.  The RequireAll
> > directive means *all* authorisation directives within it must succeed.
> > 
> > https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#requireall
> > 
> > What happens if you just remove the first line, "Require all denied"?
> 
> As you suggested I have:
> in admin/.htaccess
> 
> 
> Require ip 10.0.0.100
> 
> 
> My IP is: 10.0.0.112 and it still allow me to access it.  I know apache
> 2.4 is reading the file as the the below direcive works.

I've tested different RequireAll directives in a .htaccess file and with 
otherwise default apache  settings I can confirm:

This is correct:
=

Require ip 10.0.0.100

=
will only allow visitors from 10.0.0.100 to access the directory content.

This is also correct:
=

Require all granted
Require ip 10.0.0.100

=
will only allow visitors from 10.0.0.100 to access the directory content.

Finally, this won't work:
=

Require all denied
Require ip 10.0.0.100

=
because it returns 403 for all clients irrespective of IP address, since both 
subdirectives must be correct for the RequireAll to be true.

I notice you have 'Options MultiViews' in your modules.d/
00_default_settings.conf, which will parse paths to find and serve any file 
requested by the client even if the URL is not complete.  It might be this 
conflicts with your .htaccess within admin/ subdirectory, but I'm not sure.  
Something in apache logs may shed light in this.


> AuthName "restricted stuff"
> AuthType Basic
> AuthUserFile "/etc/apache2/users"
> require user webmaster
> 
> I've tried adding
> RewriteEngine on
> 
> With it, I can not login at all (access denied) regardless of IP.

With apache 2.4 a new  directive was added to perform conditional checks 
and replace/augment many of the mod_rewrite functionalities.  I don't know how 
you have structured your RewriteCond and RewriteRule, but obviously they don't 
work as intended if they totally block access.

You could check conflicting rules between your apache config and any .htaccess 
directives, or any loose and contradictory .htaccess files in higher 
subdirectories.

signature.asc
Description: This is a digitally signed message part.


[gentoo-user] apache 2.4 - deny access to directory

2020-11-30 Thread thelma
On 11/30/2020 05:34 AM, Michael wrote:
> On Sunday, 29 November 2020 18:22:09 GMT the...@sys-concept.com wrote:
>> Thelma
>>
>> On 11/29/2020 03:22 AM, Michael wrote:
>>> On Sunday, 29 November 2020 07:30:16 GMT the...@sys-concept.com wrote:
 I'm trying to deny access to all except specific IP address in a
 directory, just testing it.

 In modules.d/00_default_settings.conf

 

Options MultiViews
AllowOverride All
Require all granted

 

 in admin/.htaccess

 

 Require all denied
 Require ip 10.0.0.100

 

 My IP is 10.0.0.112 and I can still access the server /admin directory

 What am I missing?
>>>
>>> In apache 2.4 the access control syntax has changed.  The RequireAll
>>> directive means *all* authorisation directives within it must succeed.
>>>
>>> https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#requireall
>>>
>>> What happens if you just remove the first line, "Require all denied"?
>>
>> As you suggested I have:
>> in admin/.htaccess
>>
>> 
>> Require ip 10.0.0.100
>> 
>>
>> My IP is: 10.0.0.112 and it still allow me to access it.  I know apache
>> 2.4 is reading the file as the the below direcive works.
> 
> I've tested different RequireAll directives in a .htaccess file and with 
> otherwise default apache  settings I can confirm:
> 
> This is correct:
> =
> 
> Require ip 10.0.0.100
> 
> =
> will only allow visitors from 10.0.0.100 to access the directory content.
> 
> This is also correct:
> =
> 
> Require all granted
> Require ip 10.0.0.100
> 
> =
> will only allow visitors from 10.0.0.100 to access the directory content.
> 
> Finally, this won't work:
> =
> 
> Require all denied
> Require ip 10.0.0.100
> 
> =
> because it returns 403 for all clients irrespective of IP address, since both 
> subdirectives must be correct for the RequireAll to be true.
> 
> I notice you have 'Options MultiViews' in your modules.d/
> 00_default_settings.conf, which will parse paths to find and serve any file 
> requested by the client even if the URL is not complete.  It might be this 
> conflicts with your .htaccess within admin/ subdirectory, but I'm not sure.  
> Something in apache logs may shed light in this.
> 
> 
>> AuthName "restricted stuff"
>> AuthType Basic
>> AuthUserFile "/etc/apache2/users"
>> require user webmaster
>>
>> I've tried adding
>> RewriteEngine on
>>
>> With it, I can not login at all (access denied) regardless of IP.
> 
> With apache 2.4 a new  directive was added to perform conditional checks 
> and replace/augment many of the mod_rewrite functionalities.  I don't know 
> how 
> you have structured your RewriteCond and RewriteRule, but obviously they 
> don't 
> work as intended if they totally block access.
> 
> You could check conflicting rules between your apache config and any 
> .htaccess 
> directives, or any loose and contradictory .htaccess files in higher 
> subdirectories.

Here is complete file:   modules.d/00_default_settings.conf
I've removed 'Options MultiViews' but it disn't help.

Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
UseCanonicalName Off
AccessFileName .htaccess
ServerTokens Prod
TraceEnable off
ServerSignature Off
HostnameLookups Off
EnableMMAP On
EnableSendfile Off
FileETag MTime Size
ContentDigest Off
ErrorLog /var/log/apache2/error_log
LogLevel warn


Options FollowSymLinks
AllowOverride None
Require all denied



AllowOverride All
Require all granted



DirectoryIndex index.html index.html.var



Require all denied


The server root .htaccess is empty
In server root/admin/.htaccess


   Require ip 10.0.0.100


AuthName "restricted stuff"
AuthType Basic
AuthUserFile "/etc/apache2/users"
require user webmaster

My IP is 10.0.0.109 so I should be denied access to admin/index.php but
I'm able to view it/access it.
It seems to me it is reading .htaccess file as "AuthType Basic" work, it
is asking me for a password. but "Require ip" doesn't work.  Because my
IP is 10.0.0.109 apache should deny me access with "access denied.

It is strange as the directive: "DirectoryIndex index.html
index.html.var" does not include "index.php" and I'm able to access this
file "admin/index.php"
so the index.php must be define somewhere else. Most likely via httpd.conf:

httpd.conf:75:LoadModule autoindex_module modules/mod_autoindex.so  (but
this is a binary file, can not read it).




Re: [gentoo-user] apache 2.4 - deny access to directory

2020-11-30 Thread thelma
On 11/30/2020 05:34 AM, Michael wrote:
[snip]
> 
> I've tested different RequireAll directives in a .htaccess file and with 
> otherwise default apache  settings I can confirm:
> 
> This is correct:
> =
> 
> Require ip 10.0.0.100
> 
> =
> will only allow visitors from 10.0.0.100 to access the directory content.
> 
> This is also correct:
> =
> 
> Require all granted
> Require ip 10.0.0.100
> 
> =
> will only allow visitors from 10.0.0.100 to access the directory content.
> 
> Finally, this won't work:
> =
> 
> Require all denied
> Require ip 10.0.0.100
> 
> =
> because it returns 403 for all clients irrespective of IP address, since both 
> subdirectives must be correct for the RequireAll to be true.
> 
> I notice you have 'Options MultiViews' in your modules.d/
> 00_default_settings.conf, which will parse paths to find and serve any file 
> requested by the client even if the URL is not complete.  It might be this 
> conflicts with your .htaccess within admin/ subdirectory, but I'm not sure.  
> Something in apache logs may shed light in this.
> 
> 
>> AuthName "restricted stuff"
>> AuthType Basic
>> AuthUserFile "/etc/apache2/users"
>> require user webmaster
>>
>> I've tried adding
>> RewriteEngine on
>>
>> With it, I can not login at all (access denied) regardless of IP.
> 
> With apache 2.4 a new  directive was added to perform conditional checks 
> and replace/augment many of the mod_rewrite functionalities.  I don't know 
> how 
> you have structured your RewriteCond and RewriteRule, but obviously they 
> don't 
> work as intended if they totally block access.
> 
> You could check conflicting rules between your apache config and any 
> .htaccess 
> directives, or any loose and contradictory .htaccess files in higher 
> subdirectories.

Partial success. It seems to me .htaccess  needs: 
to work.
The blow works on IP:


   
Require ip 10.0.0.109
  


But this below doesn't work.

AuthName "restricted stuff"
AuthType Basic
AuthUserFile "/etc/apache2/users"
require user webmaster

It doesn't read "AuthType Basic" it does not ask me for password.
I wish Apache 2.2 was still in portage.



Re: [gentoo-user] apache 2.4 - deny access to directory

2020-11-30 Thread Michael
I don't have time to look into this in much detail, or test it, but see 
comments below.

On Monday, 30 November 2020 18:09:52 GMT the...@sys-concept.com wrote:
> On 11/30/2020 05:34 AM, Michael wrote:
> > On Sunday, 29 November 2020 18:22:09 GMT the...@sys-concept.com wrote:
> >> Thelma
> >> 
> >> On 11/29/2020 03:22 AM, Michael wrote:
> >>> On Sunday, 29 November 2020 07:30:16 GMT the...@sys-concept.com wrote:
>  I'm trying to deny access to all except specific IP address in a
>  directory, just testing it.
>  
>  In modules.d/00_default_settings.conf
>  
>  
>  
>   Options MultiViews
>   AllowOverride All
>   Require all granted
>  
>  
>  
>  in admin/.htaccess
>  
>  
>  
>  Require all denied
>  Require ip 10.0.0.100
>  
>  
>  
>  My IP is 10.0.0.112 and I can still access the server /admin directory
>  
>  What am I missing?
> >>> 
> >>> In apache 2.4 the access control syntax has changed.  The RequireAll
> >>> directive means *all* authorisation directives within it must succeed.
> >>> 
> >>> https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#requireall
> >>> 
> >>> What happens if you just remove the first line, "Require all denied"?
> >> 
> >> As you suggested I have:
> >> in admin/.htaccess
> >> 
> >> 
> >> 
> >> Require ip 10.0.0.100
> >> 
> >> 
> >> 
> >> My IP is: 10.0.0.112 and it still allow me to access it.  I know apache
> >> 2.4 is reading the file as the the below direcive works.
> > 
> > I've tested different RequireAll directives in a .htaccess file and with
> > otherwise default apache  settings I can confirm:
> > 
> > This is correct:
> > =
> > 
> > 
> > Require ip 10.0.0.100
> > 
> > 
> > =
> > will only allow visitors from 10.0.0.100 to access the directory content.
> > 
> > This is also correct:
> > =
> > 
> > 
> > Require all granted
> > Require ip 10.0.0.100
> > 
> > 
> > =
> > will only allow visitors from 10.0.0.100 to access the directory content.
> > 
> > Finally, this won't work:
> > =
> > 
> > 
> > Require all denied
> > Require ip 10.0.0.100
> > 
> > 
> > =
> > because it returns 403 for all clients irrespective of IP address, since
> > both subdirectives must be correct for the RequireAll to be true.
> > 
> > I notice you have 'Options MultiViews' in your modules.d/
> > 00_default_settings.conf, which will parse paths to find and serve any
> > file
> > requested by the client even if the URL is not complete.  It might be this
> > conflicts with your .htaccess within admin/ subdirectory, but I'm not
> > sure.
> > Something in apache logs may shed light in this.
> > 
> >> AuthName "restricted stuff"
> >> AuthType Basic
> >> AuthUserFile "/etc/apache2/users"
> >> require user webmaster
> >> 
> >> I've tried adding
> >> RewriteEngine on
> >> 
> >> With it, I can not login at all (access denied) regardless of IP.
> > 
> > With apache 2.4 a new  directive was added to perform conditional
> > checks and replace/augment many of the mod_rewrite functionalities.  I
> > don't know how you have structured your RewriteCond and RewriteRule, but
> > obviously they don't work as intended if they totally block access.
> > 
> > You could check conflicting rules between your apache config and any
> > .htaccess directives, or any loose and contradictory .htaccess files in
> > higher subdirectories.
> 
> Here is complete file:   modules.d/00_default_settings.conf
> I've removed 'Options MultiViews' but it disn't help.
> 
> Timeout 300
> KeepAlive On
> MaxKeepAliveRequests 100
> KeepAliveTimeout 15
> UseCanonicalName Off
> AccessFileName .htaccess
> ServerTokens Prod
> TraceEnable off
> ServerSignature Off
> HostnameLookups Off
> EnableMMAP On
> EnableSendfile Off
> FileETag MTime Size
> ContentDigest Off
> ErrorLog /var/log/apache2/error_log
> LogLevel warn
> 
> 
>   Options FollowSymLinks
>   AllowOverride None
>   Require all denied
> 
> 
> 
>   AllowOverride All
>   Require all granted
> 
> 
> 
>   DirectoryIndex index.html index.html.var
> 
> 
> 
>   Require all denied
> 
> 
> The server root .htaccess is empty
> In server root/admin/.htaccess
> 
> 
>Require ip 10.0.0.100
> 

Hmm ... as I understand it the  directive is evaluated to make an 
authorisation decision, before the authentication directive below.  If the 
authorisation fails, because you're not connecting from ip 10.0.0.100, then I 
would assume apache should return 403 and stop processing further directives.  
However, from what you say it does not do this.  :-/

I wonder if you add 'AuthMerging And' above your authentication directives 
below, it would work as expected - i.e. both 'ip 10.0.0.100' and 'user 
webmaster' should succeed before access to /admin is allowed.

> AuthName "restricted stuff"
> AuthType Bas

Re: [gentoo-user] apache 2.4 - deny access to directory

2020-11-30 Thread thelma
On 11/30/2020 12:43 PM, Michael wrote:
> I don't have time to look into this in much detail, or test it, but see 
> comments below.
> 
> On Monday, 30 November 2020 18:09:52 GMT the...@sys-concept.com wrote:
>> On 11/30/2020 05:34 AM, Michael wrote:
>>> On Sunday, 29 November 2020 18:22:09 GMT the...@sys-concept.com wrote:
 Thelma

 On 11/29/2020 03:22 AM, Michael wrote:
> On Sunday, 29 November 2020 07:30:16 GMT the...@sys-concept.com wrote:
>> I'm trying to deny access to all except specific IP address in a
>> directory, just testing it.
>>
>> In modules.d/00_default_settings.conf
>>
>> 
>>
>>  Options MultiViews
>>  AllowOverride All
>>  Require all granted
>>
>> 
>>
>> in admin/.htaccess
>>
>> 
>>
>> Require all denied
>> Require ip 10.0.0.100
>>
>> 
>>
>> My IP is 10.0.0.112 and I can still access the server /admin directory
>>
>> What am I missing?
>
> In apache 2.4 the access control syntax has changed.  The RequireAll
> directive means *all* authorisation directives within it must succeed.
>
> https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#requireall
>
> What happens if you just remove the first line, "Require all denied"?

 As you suggested I have:
 in admin/.htaccess

 

 Require ip 10.0.0.100

 

 My IP is: 10.0.0.112 and it still allow me to access it.  I know apache
 2.4 is reading the file as the the below direcive works.
>>>
>>> I've tested different RequireAll directives in a .htaccess file and with
>>> otherwise default apache  settings I can confirm:
>>>
>>> This is correct:
>>> =
>>> 
>>>
>>> Require ip 10.0.0.100
>>>
>>> 
>>> =
>>> will only allow visitors from 10.0.0.100 to access the directory content.
>>>
>>> This is also correct:
>>> =
>>> 
>>>
>>> Require all granted
>>> Require ip 10.0.0.100
>>>
>>> 
>>> =
>>> will only allow visitors from 10.0.0.100 to access the directory content.
>>>
>>> Finally, this won't work:
>>> =
>>> 
>>>
>>> Require all denied
>>> Require ip 10.0.0.100
>>>
>>> 
>>> =
>>> because it returns 403 for all clients irrespective of IP address, since
>>> both subdirectives must be correct for the RequireAll to be true.
>>>
>>> I notice you have 'Options MultiViews' in your modules.d/
>>> 00_default_settings.conf, which will parse paths to find and serve any
>>> file
>>> requested by the client even if the URL is not complete.  It might be this
>>> conflicts with your .htaccess within admin/ subdirectory, but I'm not
>>> sure.
>>> Something in apache logs may shed light in this.
>>>
 AuthName "restricted stuff"
 AuthType Basic
 AuthUserFile "/etc/apache2/users"
 require user webmaster

 I've tried adding
 RewriteEngine on

 With it, I can not login at all (access denied) regardless of IP.
>>>
>>> With apache 2.4 a new  directive was added to perform conditional
>>> checks and replace/augment many of the mod_rewrite functionalities.  I
>>> don't know how you have structured your RewriteCond and RewriteRule, but
>>> obviously they don't work as intended if they totally block access.
>>>
>>> You could check conflicting rules between your apache config and any
>>> .htaccess directives, or any loose and contradictory .htaccess files in
>>> higher subdirectories.
>>
>> Here is complete file:   modules.d/00_default_settings.conf
>> I've removed 'Options MultiViews' but it disn't help.
>>
>> Timeout 300
>> KeepAlive On
>> MaxKeepAliveRequests 100
>> KeepAliveTimeout 15
>> UseCanonicalName Off
>> AccessFileName .htaccess
>> ServerTokens Prod
>> TraceEnable off
>> ServerSignature Off
>> HostnameLookups Off
>> EnableMMAP On
>> EnableSendfile Off
>> FileETag MTime Size
>> ContentDigest Off
>> ErrorLog /var/log/apache2/error_log
>> LogLevel warn
>>
>> 
>>  Options FollowSymLinks
>>  AllowOverride None
>>  Require all denied
>> 
>>
>> 
>>  AllowOverride All
>>  Require all granted
>> 
>>
>> 
>>  DirectoryIndex index.html index.html.var
>> 
>>
>> 
>>  Require all denied
>> 
>>
>> The server root .htaccess is empty
>> In server root/admin/.htaccess
>>
>> 
>>Require ip 10.0.0.100
>> 
> 
> Hmm ... as I understand it the  directive is evaluated to make an 
> authorisation decision, before the authentication directive below.  If the 
> authorisation fails, because you're not connecting from ip 10.0.0.100, then I 
> would assume apache should return 403 and stop processing further directives. 
>  
> However, from what you say it does not do this.  :-/
> 
> I wonder if you add 'AuthMerging And' above your authentication directives 
> below, it would work as expected - i.e. both 'ip 10.0.0.100' and 'user 
> webmaster' should succeed before access 

Re: [gentoo-user] apache 2.4 - deny access to directory

2020-11-30 Thread Michael
On Monday, 30 November 2020 20:07:10 GMT the...@sys-concept.com wrote:

> Thank for looking into it and input.
> I must be missing someting because if I use in .htaccess file direcive:
>   or
>  
> 
> In both cases I get an error from Apache:
> 
> [client 10.0.0.109] /var/www/localhost/htdocs/catalog/admin/.htaccess:
>  /var/www/localhost/htdocs/catalog/admin/.htaccess:  here

Yes, the error is because Directory and/or Location directives ought to go in 
the main apache config files for this vhost, rather than in .htaccess.

Is there a particular reason you want to use .htaccess, rather than files in 
the /etc/apache subdirectories?

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] apache 2.4 - deny access to directory

2020-11-30 Thread thelma
On 11/30/2020 02:20 PM, Michael wrote:
> On Monday, 30 November 2020 20:07:10 GMT the...@sys-concept.com wrote:
> 
>> Thank for looking into it and input.
>> I must be missing someting because if I use in .htaccess file direcive:
>>   or
>>  
>>
>> In both cases I get an error from Apache:
>>
>> [client 10.0.0.109] /var/www/localhost/htdocs/catalog/admin/.htaccess:
>> > /var/www/localhost/htdocs/catalog/admin/.htaccess: > here
> 
> Yes, the error is because Directory and/or Location directives ought to go in 
> the main apache config files for this vhost, rather than in .htaccess.
> 
> Is there a particular reason you want to use .htaccess, rather than files in 
> the /etc/apache subdirectories?

Access based on IP address works from .htaccess with Files directive:


   Require ip 10.0.0.109


But it doesn't read AuthType Basic, it doesn't ask me for any password.

AuthName "restricted stuff"
AuthType Basic
AuthUserFile "/etc/apache2/users"
require user webmaster

It seems to me Apache 2.4 is very limited what can, and can not go into
.htaccess.





[gentoo-user] Brother printer HL-5370

2020-11-30 Thread thelma
Is there an easy way to install printer via cupsd/browser?

The cupsd recognized my printer but doesn't list any driver.  When I
tested Debian it recognized my printer and driver was available.
How did they do it?

-- 
Thelma



Re: [gentoo-user] Brother printer HL-5370

2020-11-30 Thread Miles Malone
Install the net-print/brother-hl5370dw-bin driver from the brother printer
overlay, and then add the printer with that driver from the cups browser
interface.  Generally I find the brother binary cups drivers pretty great

On Tue, 1 Dec 2020 at 11:17,  wrote:

> Is there an easy way to install printer via cupsd/browser?
>
> The cupsd recognized my printer but doesn't list any driver.  When I
> tested Debian it recognized my printer and driver was available.
> How did they do it?
>
> --
> Thelma
>
>


Re: [gentoo-user] Brother printer HL-5370

2020-11-30 Thread thelma
On 11/30/2020 08:41 PM, Miles Malone wrote:
> Install the net-print/brother-hl5370dw-bin driver from the brother printer
> overlay, and then add the printer with that driver from the cups browser
> interface.  Generally I find the brother binary cups drivers pretty great
> 
> On Tue, 1 Dec 2020 at 11:17,  wrote:
> 
>> Is there an easy way to install printer via cupsd/browser?
>>
>> The cupsd recognized my printer but doesn't list any driver.  When I
>> tested Debian it recognized my printer and driver was available.
>> How did they do it?

That is what I did, it worked.  Another printer I have is hl-3170cdw and
there are no drivers for it but installation via rpm is easy:

Instalation instructions at:
https://wiki.gentoo.org/wiki/Brother_networked_printer

check if exist if not make it:

mkdir -p /var/spool/lpd
mkdir -p /usr/lib64/cups/filter

rpm -i --nodeps hl3170cdwlpr-1.1.2-1.i386.rpm
rpm -i --nodeps hl3170cdwcupswrapper-1.1.4-0.i386.rpm

ln -s /usr/lib64/cups/filter/brother_lpdwrapper_hl3170cdw
/usr/libexec/cups/filter/

Ps. current "rpm-4.14.2.1-r1" package is buggy (should not be used)
there is a bug-filed against it.
rpm-4.16.0 works OK




Re: [gentoo-user] Brother printer HL-5370

2020-11-30 Thread karl
That printer supports BR-Script (PostScript lvl3 language emulation).
Why not just use postscript.

Regards,
/Karl Hammar