disallow root to install source packages by default

This commit is contained in:
Дмитрий Левин 2004-05-17 14:25:27 +00:00
parent 9058ebe09c
commit 424680beb0
2 changed files with 13 additions and 0 deletions

View File

@ -417,6 +417,14 @@ restart:
if (eiu->isSource &&
(eiu->rpmrc == RPMRC_OK || eiu->rpmrc == RPMRC_BADSIZE))
{
if (!(geteuid() || rpmExpandNumeric("%_allow_root_build")))
{
rpmError(RPMMESS_ERROR,
_("%s: current site policy disallows root to install source packages\n"),
eiu->fnp);
eiu->numFailed++; *eiu->fnp = NULL;
continue;
}
rpmMessage(RPMMESS_DEBUG, "\tadded source package [%d]\n",
eiu->numSRPMS);
eiu->sourceURL = xrealloc(eiu->sourceURL,

View File

@ -2601,6 +2601,11 @@ msgstr " ...
msgid "skipping %s - transfer failed - %s\n"
msgstr "%s 幸闲沼肆旁友 - 羡陕肆 信遗牧奚 - %s\n"
#: lib/rpminstall.c:423
#, c-format
msgid "%s: current site policy disallows root to install source packages\n"
msgstr "%s: установка пакетов с исходным кодом запрещена для привилегированного пользователя\n"
#: lib/rpminstall.c:441
#, c-format
msgid "cannot open Packages database in %s\n"