Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GRSecurity, IPv6 & Postfix
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Jtb
Apprentice
Apprentice


Joined: 19 Dec 2003
Posts: 157
Location: Germany/Darmstadt

PostPosted: Sun Dec 10, 2006 10:34 pm    Post subject: GRSecurity, IPv6 & Postfix Reply with quote

Hi,

ich habe ein Problem mit Postfix auf meinem Server:
Code:
warning: can't open /proc/net/if_inet6 (Permission denied) - skipping IPv6 configuration


Das Permission denied kommt von grsecurity und das Feature möchte ich auch weiterhin aktiv haben. Nun könnte ich bestimmte User durch eine Gruppenmitgliedschaft freischalten. Leider läuft sendmail nicht im Kontext postfix, sondern beim Einsatz im Webserver unter dem jeweiligen CGI-Benutzer. Ich möchte aber gerade, dass CGI-Benutzer keinen Zugriff auf die restlichen Prozesse haben.

Wie kann ich Postfix beibringen, dass er nicht /proc/net/if_inet6 lesen soll? Oder wie kann ich nur /proc/net/ zum Lesen für alle freigeben? Warum tritt das Problem nur bei IPv6 und nicht auch bei IPv4 auf?
_________________
Jens

.. God is real - unless declared integer!
Back to top
View user's profile Send private message
Jtb
Apprentice
Apprentice


Joined: 19 Dec 2003
Posts: 157
Location: Germany/Darmstadt

PostPosted: Tue Dec 12, 2006 10:40 am    Post subject: Reply with quote

ich habe die Frage mal auf englisch formuliert und in einem anderen Forum neu gestellt: https://forums.gentoo.org/viewtopic-p-3777638.html#3777638
_________________
Jens

.. God is real - unless declared integer!
Back to top
View user's profile Send private message
xces
Guru
Guru


Joined: 11 Oct 2002
Posts: 515

PostPosted: Tue Dec 12, 2006 8:31 pm    Post subject: Re: GRSecurity, IPv6 & Postfix Reply with quote

Jtb wrote:
Wie kann ich Postfix beibringen, dass er nicht /proc/net/if_inet6 lesen soll?

inet_interfaces und inet_protocols sollten ausreichen.

Jtb wrote:
Oder wie kann ich nur /proc/net/ zum Lesen für alle freigeben?

Lockere die Beschränkungen durch GrSecurity.
GrSecurity Dokumentation wrote:
config GRKERNSEC_PROC_USER
bool "Restrict /proc to user only"
depends on GRKERNSEC_PROC
help
If you say Y here, non-root users will only be able to view their own
processes, and restricts them from viewing network-related information,
and viewing kernel symbol and module information.
Back to top
View user's profile Send private message
Jtb
Apprentice
Apprentice


Joined: 19 Dec 2003
Posts: 157
Location: Germany/Darmstadt

PostPosted: Wed Dec 13, 2006 8:11 am    Post subject: Re: GRSecurity, IPv6 & Postfix Reply with quote

xces wrote:
Jtb wrote:
Wie kann ich Postfix beibringen, dass er nicht /proc/net/if_inet6 lesen soll?

inet_interfaces und inet_protocols sollten ausreichen.


Das Verhalten taucht ja gerade erst auf, wenn ich die IPv6-Adressen in inet_interfaces aufführe..

xces wrote:

Jtb wrote:
Oder wie kann ich nur /proc/net/ zum Lesen für alle freigeben?

Lockere die Beschränkungen durch GrSecurity.
GrSecurity Dokumentation wrote:
config GRKERNSEC_PROC_USER
bool "Restrict /proc to user only"
depends on GRKERNSEC_PROC
help
If you say Y here, non-root users will only be able to view their own
processes, and restricts them from viewing network-related information,
and viewing kernel symbol and module information.


Ich will aber gerade die Option "non-root users will only be able to view their own processes" aber aus dem genannten Postfix-Problem nicht "restricts them from viewing network-related information"...
_________________
Jens

.. God is real - unless declared integer!
Back to top
View user's profile Send private message
xces
Guru
Guru


Joined: 11 Oct 2002
Posts: 515

PostPosted: Wed Dec 13, 2006 10:03 am    Post subject: Re: GRSecurity, IPv6 & Postfix Reply with quote

Jtb wrote:
Das Verhalten taucht ja gerade erst auf, wenn ich die IPv6-Adressen in inet_interfaces aufführe..

Dann führe keine IPv6-Adresse auf. :roll:

Jtb wrote:
Ich will aber gerade die Option "non-root users will only be able to view their own processes" aber aus dem genannten Postfix-Problem nicht "restricts them from viewing network-related information"...

Dann lies die Doku...
Quote:
config GRKERNSEC_PROC_USERGROUP
bool "Allow special group"
depends on GRKERNSEC_PROC && !GRKERNSEC_PROC_USER
help
If you say Y here, you will be able to select a group that will be
able to view all processes, network-related information, and
kernel and symbol information. This option is useful if you want
to run identd as a non-root user.

config GRKERNSEC_PROC_GID
int "GID for special group"
depends on GRKERNSEC_PROC_USERGROUP
default 1001
Back to top
View user's profile Send private message
Jtb
Apprentice
Apprentice


Joined: 19 Dec 2003
Posts: 157
Location: Germany/Darmstadt

PostPosted: Wed Dec 13, 2006 10:10 am    Post subject: Re: GRSecurity, IPv6 & Postfix Reply with quote

xces wrote:
Jtb wrote:
Das Verhalten taucht ja gerade erst auf, wenn ich die IPv6-Adressen in inet_interfaces aufführe..

Dann führe keine IPv6-Adresse auf. :roll:


ich will aber IPv6 in Postfix zum Empfangen nutzen...

xces wrote:

Jtb wrote:
Ich will aber gerade die Option "non-root users will only be able to view their own processes" aber aus dem genannten Postfix-Problem nicht "restricts them from viewing network-related information"...

Dann lies die Doku...
Quote:
config GRKERNSEC_PROC_USERGROUP
bool "Allow special group"
depends on GRKERNSEC_PROC && !GRKERNSEC_PROC_USER
help
If you say Y here, you will be able to select a group that will be
able to view all processes, network-related information, and
kernel and symbol information. This option is useful if you want
to run identd as a non-root user.

config GRKERNSEC_PROC_GID
int "GID for special group"
depends on GRKERNSEC_PROC_USERGROUP
default 1001


dann lies bitte mein Post - sendmail läuft im Kontext der Benutzer. PROC_GID ist deswegen keine Option für mich..
_________________
Jens

.. God is real - unless declared integer!
Back to top
View user's profile Send private message
xces
Guru
Guru


Joined: 11 Oct 2002
Posts: 515

PostPosted: Wed Dec 13, 2006 5:54 pm    Post subject: Re: GRSecurity, IPv6 & Postfix Reply with quote

Jtb wrote:
dann lies bitte mein Post - sendmail läuft im Kontext der Benutzer. PROC_GID ist deswegen keine Option für mich..

Und wieso genau?
Back to top
View user's profile Send private message
Jtb
Apprentice
Apprentice


Joined: 19 Dec 2003
Posts: 157
Location: Germany/Darmstadt

PostPosted: Wed Dec 13, 2006 9:43 pm    Post subject: Re: GRSecurity, IPv6 & Postfix Reply with quote

xces wrote:
Jtb wrote:
dann lies bitte mein Post - sendmail läuft im Kontext der Benutzer. PROC_GID ist deswegen keine Option für mich..

Und wieso genau?


sendmail wird z.B. von PHP aufgerufen. D.h. es läuft im Kontext des CGI-Benutzers.
Gerade diese CGI-Benutzer möchte ich aber abgegrenzt haben, so dass sie keine Prozesse von anderen Benutzern sehen..
_________________
Jens

.. God is real - unless declared integer!
Back to top
View user's profile Send private message
xces
Guru
Guru


Joined: 11 Oct 2002
Posts: 515

PostPosted: Wed Dec 13, 2006 10:22 pm    Post subject: Re: GRSecurity, IPv6 & Postfix Reply with quote

Jtb wrote:
Gerade diese CGI-Benutzer möchte ich aber abgegrenzt haben, so dass sie keine Prozesse von anderen Benutzern sehen..

Es ist ja nicht so, dass ich dein Problem nicht erkenne, aber du kannst nicht das System so abschotten, dass bestimmte Dinge nicht mehr gehen und dich dann beschweren, dass diese Dinge nicht mehr gehen. :roll:

Bei deinem Setup könntest du einen Sendmail-Wrapper wie ssmtp installieren, der die Mails via SMTP bei deinem MTA einkippt und mit den eingeschränkten Rechten läuft. Oder du gibst Postfix bei Aufruf des Sendmail-Wrappers eine andere Konfiguration (Umgebungsvariable MAIL_CONFIG) mit, die auf IPv6 verzichtet.

Dass Postfix Zugriff auf /proc/net/if_inet6 benötigt, wenn du den smtpd an ein IPv6-Interface bindest, wirst du jedenfalls nicht ändern können. Wenn du die Zugriffe feingranularer steuern können willst, solltest du dir vielleicht RBAC von GrSecurity oder RSBAC ansehen.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum