Решено: Компьютер пишет мне письма, я в смятении

Sabayon, Calculate, Funtoo, Exherbo

Модератор: /dev/random

Ответить
azsx
Сообщения: 3684
ОС: calculate linux, debian, ubuntu

Решено: Компьютер пишет мне письма, я в смятении

Сообщение azsx »

Компьютер мне написал три письма, я их почитал (eselect news read
), задумался.
1. Ну первые два письма понятно, о безопасности. А о чём третье письмо? Что если при компиляции будут идти какие то ошибки, то мне надо что-то перекомпилировать каким то компилятором особой версии? Надо ли как то реагировать на эти письма?
2. Почему дата писем 2015 и 16 год? У меня по команде date нормальная дата выходит

Код: Выделить всё

date
 Ср окт 11 16:03:31 +08 2017

Письма ниже
2015-04-06-apache-addhandler-addtype
Title Apache AddHandler/AddType exploit protection
Author Sebastian Pipping <sping@gentoo.org>
Posted 2015-04-06
Revision 2

Apache's directives AddHandler [1] and AddType [2] can be used
to map certain file name extensions (e.g. .php) to a handler
(e.g. application/x-httpd-php). While a line like

AddHandler application/x-httpd-php .php .php5 .phtml
^^^^^^^
matches index.php, it also matches index.php.png.
With

AddType application/x-httpd-php .php .php5 .phtml
^^^^
index.php.png is not executed, but index.php.disabled still is.


Apache's notes on multiple file extensions [3] document
a multi-language website as a context where that behavior
may be helpful. Unfortunately, it can also be a security threat.

Combined with (not just PHP) applications that support
file upload, the AddHandler/AddType directive can get you into
remote code execution situations.

That is why >=app-eselect/eselect-php-0.7.1-r4 avoids AddHandler
and is shipping

<FilesMatch "\.(php|php5|phtml){:content:}quot;>
SetHandler application/x-httpd-php
</FilesMatch>

instead.


Why this news entry?

* Since Apache configuration lives below /etc,
you need to run etc-update (or a substitute)
to actually have related fixes applied.
To get them into the running instance of Apache,
you need to make it reload its configuration, e.g.

sudo /etc/init.d/apache2 reload

* If you are currently relying on AddHandler to execute
secret_database_stuff.php.inc, moving away from AddHandler
could result in serving your database credentials in plain
text. A command like

find /var/www/ -name '*.php.*' \
-o -name '*.php5.*' \
-o -name '*.phtml.*'

may help discovering PHP files that would no longer be executed.

Shipping automatic protection for this scenario is not trivial,
but you could manually install protection based on this recipe:

<FilesMatch "\.(php|php5|phtml|phps)\.">
# a) Apache 2.2 / Apache 2.4 + mod_access_compat
#Order Deny,Allow
#Deny from all

# b) Apache 2.4 + mod_authz_core
#Require all denied

# c) Apache 2.x + mod_rewrite
#RewriteEngine on
#RewriteRule .* - [R=404,L]
</FilesMatch>

* You may be using AddHandler or AddType in other places,
including off-package files. Please have a look.

* app-eselect/eselect-php is not the only package affected.
There is a dedicated tracker bug at [4].
As of the moment, affected packages include:

app-eselect/eselect-php[apache2]
net-nds/gosa-core
www-apache/mod_fastcgi
www-apache/mod_flvx
www-apache/mod_python
www-apache/mod_suphp
www-apps/moinmoin
www-apps/rt[-lighttpd]


Thanks to Nico Suhl, Michael Orlitzky and Marc Schiffbauer.

[1] https://httpd.apache.org/docs/current/mod/m...html#addhandler
[2] https://httpd.apache.org/docs/current/mod/m...me.html#addtype
[3] https://httpd.apache.org/docs/current/mod/m...tml#multipleext
[4] https://bugs.gentoo.org/show_bug.cgi?id=544560

2015-10-22-gcc-5-new-c++11-abi
Title GCC 5 Defaults to the New C++11 ABI
Author Mike Frysinger <vapier@gentoo.org>
Posted 2015-10-22
Revision 2

GCC 5 uses the new C++ ABI by default. When building new code, you might run
into link time errors that include lines similar to:
...: undefined reference to '_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17'

Or you might see linkage failures with "std::__cxx11::string" in the output.

These are signs that you need to rebuild packages using the new C++ ABI.
You can quickly do so by using revdep-rebuild (from gentoolkit).

For gentoolkit-0.3.1 or higher:
# revdep-rebuild --library 'libstdc++.so.6' -- --exclude gcc

For previous versions of gentoolkit:
# revdep-rebuild --library 'libstdc\+\+\.so\.6' -- --exclude gcc

For more details, feel free to peruse:
https://developerblog.redhat.com/2015/02/05...nd-the-c11-abi/
https://blogs.gentoo.org/blueness/2015/03/1...blem-in-gentoo/

2016-01-27-upgrading-to-apache-2_4
Title Upgrading Apache from 2.2 to 2.4
Author Dirkjan Ochtman <djc@gentoo.org>
Posted 2016-01-27
Revision 1

With the 2.4 branch released by upstream almost 4 years ago, stable
Gentoo systems will soon be upgraded from apache 2.2 to apache 2.4.
When upgrading, some configuration changes will have to be made.
Upstream has a handy guide:

https://httpd.apache.org/docs/2.4/upgrading.html

For more information on all the new features, start here:

https://httpd.apache.org/docs/trunk/new_features_2_4.html

After emerging Apache 2.4, you will also need to rebuild any
third-party modules:

emerge -av1 /usr/lib/apache2/modules --exclude=www-servers/apache
Спасибо сказали:
Аватара пользователя
/dev/random
Администратор
Сообщения: 5281
ОС: Gentoo

Re: Решено: Компьютер пишет мне письма, я в смятении

Сообщение /dev/random »

Какие из новостей показывать, а какие - нет, определяется (для большинства новостей) установленными у вас версиями пакетов, а не датой. Однако все 3 приведённые новости имеют смысл только при обновлении системы. Если они были видны с самого момента установки, то их можно спокойно проигнорировать. Те же, что будут появляться в дальнейшем, читайте внимательно.
Спасибо сказали:
azsx
Сообщения: 3684
ОС: calculate linux, debian, ubuntu

Re: Решено: Компьютер пишет мне письма, я в смятении

Сообщение azsx »

сразу после установки у меня была одна новость, но я её не читал, так как не понимал, что мне надо делать. Судя по всему два письма появились сразу после установки php.
Как я логично подозреваю, идёт блоговая сортировка, то есть более новые письма всегда будут наверху, верно?
Также при обновлении системы -- это emerge -e @world? И как мне реагировать на gcc-5-new-c++11-abi? То есть что хоть приблизительно перед обновлением делать?
Спасибо сказали:
Аватара пользователя
/dev/random
Администратор
Сообщения: 5281
ОС: Gentoo

Re: Решено: Компьютер пишет мне письма, я в смятении

Сообщение /dev/random »

azsx писал(а):
11.10.2017 11:32
сразу после установки у меня была одна новость, но я её не читал, так как не понимал, что мне надо делать. Судя по всему два письма появились сразу после установки php.

Установки, не обновления? Тогда не обращайте на них внимания.

azsx писал(а):
11.10.2017 11:32
Как я логично подозреваю, идёт блоговая сортировка, то есть более новые письма всегда будут наверху, верно?

Я понятия не имею, в каком порядке они пишутся, потому что я делаю eselect news read new, а не eselect news read all. Так он показывает только те новости, которые ещё ни разу не показывал.

azsx писал(а):
11.10.2017 11:32
Также при обновлении системы -- это emerge -e @world?

emerge -e @world пересобирает _все_ установленные пакеты, используется только в особых случаях. Обычно обновление выполняется командой emerge -uND @world.

azsx писал(а):
11.10.2017 11:32
И как мне реагировать на gcc-5-new-c++11-abi? То есть что хоть приблизительно перед обновлением делать?

Эта новость об обновлении с gcc4 на gcc5. У вас же, насколько я понимаю, изначально был gcc5.
Спасибо сказали:
azsx
Сообщения: 3684
ОС: calculate linux, debian, ubuntu

Re: Решено: Компьютер пишет мне письма, я в смятении

Сообщение azsx »

Думаю суть ответа про новости за два топика я понял.
Эта новость об обновлении с gcc4 на gcc5. У вас же, насколько я понимаю, изначально был gcc5.

Как вы угадали, что у меня gcc5, а не 4 -- непонятно.
Спасибо сказали:
azsx
Сообщения: 3684
ОС: calculate linux, debian, ubuntu

Re: Решено: Компьютер пишет мне письма, я в смятении

Сообщение azsx »

Скажите, пожалуйста, надо ли что-то делать?
We have just added (for all arches except arm and mips, these follow
later) a new set of profiles with release version 17.0 to the Gentoo
repository. These bring three changes:
1) The default C++ language version for applications is now C++14.
This change is mostly relevant to Gentoo developers. It also
means, however, that compilers earlier than GCC 6 are masked
and not supported for use as a system compiler anymore. Feel
free to unmask them if you need them for specific applications.
2) Where supported, GCC will now build position-independent
executables (PIE) by default. This improves the overall
security fingerprint. The switch from non-PIE to PIE binaries,
however, requires some steps by users, as detailed below.
3) Up to now, hardened profiles were separate from the default
profile tree. Now they are moving into the 17.0 profile
as a feature there, similar to "no-multilib" and "systemd".

Please migrate away from the 13.0 profiles within the six weeks after
GCC 6.4.0 has been stabilized on your architecture. The 13.0 profiles
will be deprecated then and removed in half a year.

If you are not already running a hardened setup with PIE enabled, then
switching the profile involves the following steps:
If not already done,
* Use gcc-config to select gcc-6.4.0 or later as system compiler
* Re-source /etc/profile:
. /etc/profile
* Re-emerge libtool
emerge -1 sys-devel/libtool
Then,
* Select the new profile with eselect
* Re-emerge, in this sequence, gcc, binutils, and glibc
emerge -1 sys-devel/gcc:6.4.0
emerge -1 sys-devel/binutils
emerge -1 sys-libs/glibc
* Rebuild your entire system
emerge -e @world

Switching the profile from 13.0 to 17.0 modifies the settings of
GCC 6 to generate PIE executables by default; thus, you need to do
the rebuilds even if you have already used GCC 6 beforehand.
If you do not follow these steps you may get spurious build
failures when the linker tries unsuccessfully to combine non-PIE
and PIE code.
Спасибо сказали:
Аватара пользователя
devilr
Сообщения: 3665
ОС: Mandriva => Gentoo (~amd64)
Контактная информация:

Re: Решено: Компьютер пишет мне письма, я в смятении

Сообщение devilr »

Надо. Просто внимательно прочитать, для начала. :)
Разговор идет за переключение профиля. 13 устарел - предлагается 17. Хотите - можете переключиться, в письме описывается как. Если нет - выбор ваш.
Мудрость приходит с возрастом.
Иногда возраст приходит один.
Эхо разума
Спасибо сказали:
azsx
Сообщения: 3684
ОС: calculate linux, debian, ubuntu

Re: Решено: Компьютер пишет мне письма, я в смятении

Сообщение azsx »

If you do not follow these steps you may get spurious build
failures when the linker tries unsuccessfully to combine non-PIE
and PIE code.
Как я понимаю, мне не оставляют выбора.
emerge -e @world
Опять же придётся пересобрать всё, что совсем тяжко для моего компьютера будет (мультики в фоне не посмотришь).
и ничего не написано, что делать если я не понимаю надо ли мне С++ 17 или не надо :(
Спасибо сказали:
Аватара пользователя
devilr
Сообщения: 3665
ОС: Mandriva => Gentoo (~amd64)
Контактная информация:

Re: Решено: Компьютер пишет мне письма, я в смятении

Сообщение devilr »

azsx писал(а):
08.10.2018 11:46
If you do not follow these steps you may get spurious build
failures when the linker tries unsuccessfully to combine non-PIE
and PIE code.
Как я понимаю, мне не оставляют выбора.
emerge -e @world
Опять же придётся пересобрать всё, что совсем тяжко для моего компьютера будет (мультики в фоне не посмотришь).
и ничего не написано, что делать если я не понимаю надо ли мне С++ 17 или не надо :(
Ну, переключение профиля - штука весьма тяжелая. Особенно, в плане сборки/пересборки. Но, само переключение требуется очень редко - раз в несколько лет. Или вообще не делается.
А надо ли "С++ 17" или не надо - решать только вам. Особенно, если вы - программист. :) Для обычных программ, жёсткое указание "компилятор только такой и никакой иначе" бывает достаточно редко. Допустим, припоминаю такое в последний раз, когда надо было обновить cuda - требовался вполне определенный компилятор. Но и там был выход - можно в системе держать несколько компиляторов и переключаться/собирать_ими по необходимости.
Мудрость приходит с возрастом.
Иногда возраст приходит один.
Эхо разума
Спасибо сказали:
Ответить