ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Alexey Morsov <samurai@ricom.ru>
To: community@altlinux.ru
Subject: Re: [COMM] кошерный запуск процесса
Date: Mon, 14 Feb 2005 11:17:02 +0300
Message-ID: <42105E7E.7030602@ricom.ru> (raw)
In-Reply-To: <7F656893B4EBB84BA46DB77DB894399C69CAE7@kmex3.kvazar-micro.com>


Eugene.Ostapets@kvazar-micro.com wrote:
> man fork
Работает :)

> man setreuid
> man setrugid
использовал setuid, setgid - это так ли уж фажно? вродед работает и 
пнормально работает, как требуется :)

> man 2 chroot
Работает :)

Вот... теперь при $demon - d он запускает демона сохраняя его pid в 
файл, а при $demon -s убивает его считав pid из файла..
Круто!

Но осталось два момента:
пути к chroot, log, pid файла ну и еще host к которому конектироваться 
будет... что бы уж совсем кошрено их бы вынести в файл .conf, но как из 
него потом читать попроще?
Пробовал fscanf(file,"%s = %s", &name, &value) по строкам... читает... и 
даже коменты различает, но это как-то очень жестко и не очень удобно.
Есть ли другие способы?

И второй момент - собственно установка UID\GID - чем можно получить ID 
по имени?

-- 
Всего наилучшего,
Системный Администратор ЗАО "ИК "РИКОМ-ТРАСТ"
Алексей Морсов
ICQ: 196766290
Jabber: Samurai@jabber.pibhe.com
http://www.ricom.ru
http://www.fondmarket.ru


  parent reply	other threads:[~2005-02-14  8:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-10 12:10 Eugene.Ostapets
2005-02-10 12:42 ` Alexey Morsov
2005-02-10 13:10   ` Alexey V. Novikov
2005-02-11  9:55   ` Grigory Milev
2005-02-11 10:12     ` Alexey Morsov
2005-02-11 10:36       ` Grigory Milev
2005-02-11 11:20         ` Alexey Morsov
2005-02-11 11:33           ` Andriy Dobrovol's'kii
2005-02-11 11:40             ` Alexey Morsov
2005-02-11 12:05           ` Grigory Milev
2005-02-11 14:12             ` Alexey Morsov
2005-02-14  8:17 ` Alexey Morsov [this message]
2005-02-14 11:32 ` Eugene Prokopiev
2005-02-15 13:13 ` Alexey Morsov
2005-02-15 13:34   ` [COMM][JT] " Vasya Makarov
2005-02-15 14:46     ` Alexey Morsov

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=42105E7E.7030602@ricom.ru \
    --to=samurai@ricom.ru \
    --cc=community@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