From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 1 05:19:28 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 675E110658C2 for ; Thu, 1 Jul 2010 05:19:28 +0000 (UTC) (envelope-from andrey.zonov@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by mx1.freebsd.org (Postfix) with ESMTP id E8CFA8FC30 for ; Thu, 1 Jul 2010 05:19:27 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id e12so306216fga.13 for ; Wed, 30 Jun 2010 22:19:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Ez8skYFuVP1gGxosd1T1ZbGt3D45Y/EPTmYEAM5s9ww=; b=fdfzShlryOX+vo9vIy8pXpI3Ar7Hs1eQ8nuwckUckayn1CIf9d8wFOXhCcM1OrUT69 D4KOStz1im9xYSWfw/OJu4CAbqsezsOnRVrgYBM0Fi5rQb9wzwv3Fm74efcGKl5mS0Di om+PVvCRA0I27HcJDEdpnQK0pqJcWXhCliNJ4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=qVXPHFD/tJwG4UbPBRc8p4pKKMce/9wVzQAumEZ31l/S67yU6ok/A8PnAl+RWEQ3vm MHCyewxt6+dRFjOTzdPksjv5wBGdX0PRptM28Tf3w1mw6NSIIXo5cqHNnZ/44sy+5RKM Iw0o8bPL5bWX3zdpq9lNLfyhhs9H1kfFMcAR4= Received: by 10.87.1.7 with SMTP id d7mr14449873fgi.75.1277961561663; Wed, 30 Jun 2010 22:19:21 -0700 (PDT) Received: from [10.254.254.77] (ppp79-139-207-225.pppoe.spdop.ru [79.139.207.225]) by mx.google.com with ESMTPS id y15sm6855681fkd.8.2010.06.30.22.19.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 30 Jun 2010 22:19:20 -0700 (PDT) Message-ID: <4C2C2557.3030304@gmail.com> Date: Thu, 01 Jul 2010 09:19:19 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Julian Elischer References: <4C2AE37C.5060000@gmail.com> <4C2AF285.1090506@yandex.ru> <4C2B8B95.4010908@gmail.com> <4C2BBCC9.7000605@elischer.org> In-Reply-To: <4C2BBCC9.7000605@elischer.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org 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: Thu, 01 Jul 2010 05:19:28 -0000 Can you explain how change flags with /dev/kmem? kvm_write(3) not work for this. Julian Elischer пишет: > 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? >>> >> > -- Andrey Zonov