From: AT <alexey_tourbin@mail.ru> To: ALT Linux Spring mailing list <mandrake-russian@altlinux.ru> Subject: Re: [mdk-re] chroot solution... Date: Thu Sep 6 02:28:12 2001 Message-ID: <20010906021714.A21910@localhost.localdomain> (raw) In-Reply-To: <20010905213746.E27922@ldv.office.alt-linux.org>; from ldv@alt-linux.org on Wed, Sep 05, 2001 at 09:37:46PM +0400 > Есть библиотеки, которые подключаются не при старте, а позднее, во время > работы программы. Например, resolver, NSS. Тогда возникает вопрос. Вот есть какая-нибудь программа: #include <stdio.h> #include <unistd.h> int main() { ... rv = crypt(guess, good); ... if (chroot("/home/www")) exit(0); else { ... rv = crypt(guess, good); ... } } И динамически линкуется: $ gcc prog.c -o prog -lcrypt Из какой библиотеки будет вызвана crypt(3) во втором случае? Из той, что в /lib, или из /home/www/lib? > Если в chroot'е нет рута, то можно. Здесь хотелось бы подробнее: что практически означает "в chroot'е нет рута"? В локальном /etc/passwd нету root'а, владелец процессов под chroot'ом -- не root... > Кроме того, могу предложить прочесть статью, где, в частности, обсуждается > и эта тема: http://altlinux.ru/index.php?module=articles&action=show&artid=5 Спасибо, хорошая статья. Кое-что проясняет. Наиболее интересен поздний chroot без wrapper'а. То есть программа должна запуститься, прочитать конфигурационные файлы и сама сделать chroot/setuid. Интерес же, конечно, в том, что в chroot'е вообще не будет видно ни бинариков, ни конфигурационных файлов (пример: хакер проник в chroot через www и даже не может узнать, какой httpd запущен). При такой модели можно организовать "отсутствие рута в chroot'е"? Если бы ещё как-нибудь можно было вынести библиотеки (1-ый вопрос)... PS: в этом листе можно задавать вопросы по RSBAC? > +-------------------------------------------------------------------------+ > Dmitry V. Levin mailto://ldv@alt-linux.org > ALT Linux Team http://www.altlinux.ru/ > Fandra Project http://www.fandra.org/ > +-------------------------------------------------------------------------+ > UNIX is user friendly. It's just very selective about who its friends are. __ AT
prev parent reply other threads:[~2001-09-06 2:28 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-09-05 3:49 [mdk-re] chroot AT 2001-09-05 9:51 ` cornet 2001-09-05 12:17 ` Dmitry V. Levin 2001-09-05 17:26 ` AT 2001-09-05 18:45 ` AT 2001-09-05 19:23 ` Dmitry V. Levin 2001-09-05 20:33 ` [mdk-re] chroot solution AT 2001-09-05 20:52 ` [mdk-re] " Alexander Bokovoy 2001-09-05 21:32 ` [mdk-re] " Dmitry V. Levin 2001-09-05 23:58 ` [mdk-re] chroot solution=>escape from chroot cornet 2001-09-06 2:28 ` AT [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20010906021714.A21910@localhost.localdomain \ --to=alexey_tourbin@mail.ru \ --cc=mandrake-russian@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git