From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 30 21:52:53 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3A67106566B for ; Wed, 30 Jun 2010 21:52:52 +0000 (UTC) (envelope-from julian@elischer.org) Received: from out-0.mx.aerioconnect.net (outv.internet-mail-service.net [216.240.47.245]) by mx1.freebsd.org (Postfix) with ESMTP id D56B98FC2A for ; Wed, 30 Jun 2010 21:52:52 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id o5ULqq1m010708; Wed, 30 Jun 2010 14:52:52 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id D31172D6015; Wed, 30 Jun 2010 14:52:50 -0700 (PDT) Message-ID: <4C2BBCC9.7000605@elischer.org> Date: Wed, 30 Jun 2010 14:53:13 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Andrey Zonov References: <4C2AE37C.5060000@gmail.com> <4C2AF285.1090506@yandex.ru> <4C2B8B95.4010908@gmail.com> In-Reply-To: <4C2B8B95.4010908@gmail.com> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: freebsd-hackers@freebsd.org, "Andrey V. Elsukov" Subject: Re: How change process flags from userland? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 21:52:53 -0000 On 6/30/10 11:23 AM, Andrey Zonov wrote: > Yes, but I want change process flags without kernel hacking/loading > modules or modification applications. you are going to have to do one of those. The only alternative is that if you have root you can modify a processe's flags using gdb and /dev/kmem. you could use a program to do it specially if you have root, but if that's not what you want then you will need to add a syscall to do what you want as far as I can see. > > Andrey V. Elsukov пишет: >> On 30.06.2010 10:26, Andrey Zonov wrote: >>> Hi, >>> >>> I want to set P_PROTECTED flag for some daemons after it start, without >>> patching application and kernel. >>> It possible? >>> >> >> Did you try sysutils/scprotect? >> >