From owner-freebsd-questions Thu Feb 27 10:38:52 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2E2A37B401 for ; Thu, 27 Feb 2003 10:38:50 -0800 (PST) Received: from spf1.us.outblaze.com (205-158-62-139.outblaze.com [205.158.62.139]) by mx1.FreeBSD.org (Postfix) with SMTP id E49CD43F85 for ; Thu, 27 Feb 2003 10:38:49 -0800 (PST) (envelope-from tomazo@fastermail.com) Received: (qmail 5951 invoked from network); 27 Feb 2003 18:38:49 -0000 Received: from unknown (205.158.62.146) by spf1.us.outblaze.com with QMQP; 27 Feb 2003 18:38:49 -0000 Received: (qmail 9921 invoked from network); 27 Feb 2003 18:35:38 -0000 Received: from unknown (HELO ws4.hk5.outblaze.com) (202.77.181.85) by 205-158-62-146.outblaze.com with SMTP; 27 Feb 2003 18:35:38 -0000 Received: (qmail 20911 invoked by uid 1001); 27 Feb 2003 18:38:04 -0000 Message-ID: <20030227183804.20910.qmail@fastermail.com> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Mailer: MIME-tools 5.41 (Entity 5.404) Received: from [212.73.100.109] by ws4.hk5.outblaze.com with http for tomazo@fastermail.com; Fri, 28 Feb 2003 02:38:04 +0800 From: "Tomazo Lujiano" To: freebsd-questions@freebsd.org Date: Fri, 28 Feb 2003 02:38:04 +0800 Subject: FreeBSD sysctls X-Originating-Ip: 212.73.100.109 X-Originating-Server: ws4.hk5.outblaze.com Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, FreeBSD hackers! And here is my problem: I use FreeBSD-4.7 Stable at home. My machine also provides an Internet access in our local network. That's why I set different firewalls, ipfilters and other stuff to provide the security in our private net. So, I'd also like to defend my server from OS-detectors, such as nmap and some others and change TCP-stack as well. And what I do: sysctl kern.ostype kern.ostype: FreeBSD Well, everything is clear. Then I type: sysctl kern.ostype=Lotus_Notes/DOMINO but see: sysctl: oid 'kern.ostype' is read only Hm, well, in file /usr/src/sbin/sysctl.c I see the following: if (!(kind&CTLFLAG_WR)) errx(1, "oid '%s' is read only", bufp); Ok, let it be. sysctl.c depends on the header file, /usr/include/sys/sysctl.h -bash-2.05b$ cat /usr/include/sys/sysctl.h | grep CTLFLAG_WR #define CTLFLAG_WR 0x40000000 /* Allow writes to the variable */ #define CTLFLAG_RW (CTLFLAG_RD|CTLFLAG_WR) -bash-2.05b$ As far as I understand, CTLFLAG_WR declaration allows to chande sysctls. And so, I can't change the value of sysctl, if this sysctl follows to the condition-"if (!(kind&CTLFLAG_WR))" in /usr/src/sbin/sysctl.c file. Than's all clear. But one thing: from where does the sysctl take the information or command to return "false" after being "asked" by condition "if (!(kind&CTLFLAG_WR))"??? Why some sysctl names follow to this condition, return "true" and could be changed accordingly, and others don't follow, return "false" and so, remain unchangeable??? I want to change kern.ostype anyway! And another question: I wanna take participating in FreeBSD project. May be there are some sites or links, where this question is described, but I wanna ask you directly: I want to translate documentation from English into Russian. Please, tell me, which topics aren't occupied yet by other interpriters - and I 'll do all possible to translate them!... Thank you very much. Best Regards! -- _______________________________________________ Get your free email from http://www.fastermail.com Powered by Outblaze To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message