adding an address family
Hi, I wonder if it is possible to dynamicly add an address family from a kernel module. I ask this because I am working on IrDA support for FreeBSD. I want to create AF_IRDA and all the corresponding structures and functions. So would it be possible to add another network stack at runtime or is the code not ready for that? Thanks Mark -- Mark Santcroos RIPE Network Coordination Centre PGP KeyID: 1024/0x3DCBEB8D PGP Fingerprint: BB1E D037 F29D 4B40 0B26 F152 795F FCAB 3DCB EB8D To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Setting default hostname to localhost
A look at /usr/src/libexec/getty/main.c shows the folowing: if (hostname[0] == '\0') strcpy(hostname, "Amnesiac"); so, coherence suggests that the default should be "Amnesiac". Othewise, you'll get different hostnames for dhcp (and the like), and getty sessions. regards, mouss At 11:45 12/01/01 -0800, Archie Cobbs wrote: There is an RFC that specifies a "private use" top level domain, analogous to 192.168.0.0/16, 10.0.0.0/8, etc. The domain is ".local" so any default ending in ".local" should not conflict. -Archie ___ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: pppd mkdir diff
These are probably cosmetic comments, but here they are anyway... At 09:54 13/01/01 +, W.H.Scholten wrote: +char *dirname(char *path) { + char *slash; + + while (path[ strlen(path)-1 ] == '/') path[ strlen(path)-1 ] = 0; if path is an empty string, you are accessing path[-1], which is dangerous. Also, you're computing strlen too many times, and strlen is a loop (while (*ptr) ptr++). so I suggest using a pointer to the string as in /usr/bin/dirname/dirname.c. mainly: if (*path == '\0') return "/"; /* if const is not ok, strdup("/") */ ptr = path; while (*ptr) ptr++; while ((*ptr == '/') (ptr path)) ptr--; ... + + slash = strrchr(path, '/'); + if (slash) { + *slash = 0; + while (path[ strlen(path)-1 ] == '/') path[ strlen(path)-1 ] = 0; you already did that (I mean trimming the trailing slashes). Finally, I'd propose adding such a function (dirname) in a library (either libc or say libfile) to allow code reuse. such a lib would contain functions such as basename, dir_create (mkdir -p), so that the commands mkdir, rmdir, cp, mv, ... etc call the lib functions instead of rewriting code. regards, mouss To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: pppd mkdir diff
On Tue, Jan 16, 2001 at 01:32:13PM +0100, mouss wrote: These are probably cosmetic comments, but here they are anyway... At 09:54 13/01/01 +, W.H.Scholten wrote: +char *dirname(char *path) { + char *slash; + + while (path[ strlen(path)-1 ] == '/') path[ strlen(path)-1 ] = 0; if path is an empty string, you are accessing path[-1], which is dangerous. Also, you're computing strlen too many times, and strlen is a loop (while (*ptr) ptr++). so I suggest using a pointer to the string as in /usr/bin/dirname/dirname.c. mainly: if (*path == '\0') return "/"; /* if const is not ok, strdup("/") */ ptr = path; while (*ptr) ptr++; while ((*ptr == '/') (ptr path)) ptr--; ... + + slash = strrchr(path, '/'); + if (slash) { + *slash = 0; + while (path[ strlen(path)-1 ] == '/') path[ strlen(path)-1 ] = 0; you already did that (I mean trimming the trailing slashes). Finally, I'd propose adding such a function (dirname) in a library (either libc or say libfile) to allow code reuse. such a lib would contain functions such as basename, dir_create (mkdir -p), so that the commands mkdir, rmdir, cp, mv, ... etc call the lib functions instead of rewriting code. As somebody already pointed out, there *is* a dirname(3) function, and even a dirname(1) cmdline utility to invoke it. In a followup to Alfred's mkdir(1) commit, I sent a sample implementation of a direxname() function, which calls dirname(3) in a loop, and returns the longest existing path component. I'll get back to him shortly with a patch to mkdir(1) using direxname() to report a meaningful error message, something like "Cannot create /exists/nonex/foo/bar, nonexistent path components after /exists". In the meantime, attached is my first shot at direxname() implementation, using dirname(3)'s static buffer. G'luck, Peter -- "yields falsehood, when appended to its quotation." yields falsehood, when appended to its quotation. #include sys/types.h #include sys/stat.h #include err.h #include errno.h #include libgen.h #include stdio.h #include sysexits.h #include unistd.h char *direxname(const char *path); void usage(void); int main(int argc, char **argv) { char ch, *p; while (ch = getopt(argc, argv, ""), ch != -1) switch (ch) { case '?': default: usage(); } argc -= optind; argv += optind; if (argc != 1) usage(); if (p = direxname(argv[0]), p == NULL) err(1, "%s", argv[0]); printf("%s\n", p); return (EX_OK); } void usage(void) { errx(EX_USAGE, "usage: direxname path"); } char * direxname(const char *path) { char *d; struct stat sb; for (d = dirname(path); d != NULL; d = dirname(d)) { if (stat(d, sb) == 0) return (d); if ((errno != ENOTDIR) (errno != ENOENT)) return (NULL); } /* dirname() returned NULL, errno is set */ return (NULL); } To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: pppd mkdir diff
At 14:50 16/01/01 +0200, Peter Pentchev wrote: As somebody already pointed out, there *is* a dirname(3) function, and even a dirname(1) cmdline utility to invoke it. oops. I'll need to stay current:) In a followup to Alfred's mkdir(1) commit, I sent a sample implementation of a direxname() function, which calls dirname(3) in a loop, and returns the longest existing path component. I'll get back to him shortly with a patch to mkdir(1) using direxname() to report a meaningful error message, something like "Cannot create /exists/nonex/foo/bar, nonexistent path components after /exists". In the meantime, attached is my first shot at direxname() implementation, using dirname(3)'s static buffer. I'm not convinced you really need to check which is the "largest" parent that exists. if /a doesn't exist, and I do a mkdir /a/b/c/d, just a "/a/b/c does not exist" is far sufficient. For me, if you ignore permissions and the like, the condition to create a directory is that its parent exists, whatever are his grand-parents. after the error is shown, one will anyway check which dirs exist. doing the stat() on all those just consumes time, with few benefits. on an NFS mounted fs, this would be just annoyiing sometimes. now if you really insist, I'd suggest doing the stat the other way: check the root, then its children, then the children of the latter... like in mkdir -p. at last, note that there might be race conditions while you stat(). but there is hardly a way to avoid'em. at least, a single stat() reduces the window of opportunity. regards, mouss To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: FreeBSD boot manager, where is latest version?
I've recently switched to Smart Boot Manager which I noticed on freshmeat awhile ago. You can find it at http://www.gnuchina.org/~suzhe/ I found it easiest to download the DOS .exe and put it on a floppy and install it that way. For fitting in the boot block (no seperate partition required) it has quite a number of features. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Mounting a CDROM in freeBSD 4.2
In article [EMAIL PROTECTED], [EMAIL PROTECTED] writes: Please send the response directly back to me, in addition to sending it to hackers , as the volume of mail to hackers is so great that I could very easily miss the response if it were only sent there. I just installed freeBSD 4.2 and found that I couldn't mount a CDROM even though I copied the command-lines from (the top of) page 236 of Greg Lehey's book (ISBN 1-57176-246-9). When I was running freeBSD 3.3 , I was able to mount a CDROM , and I believe I did it just as described in Greg's book. The error message that I get is 'cd9660: Device not configured'. I was able to mount and read an MSDOS floppy. The naming of the cdrom has changed from 3.x to 4.x. I do not remember the old name but the new name is /dev/acd0c for an ATAPI cdrom. So you must have in /etc/fstab something like... /dev/acd0c /cdrom cd9660 ro,noauto 0 0 Maybe you encounter this kind of trouble. Regards, Phil. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: open PR WRT syslogd vs. serial consoles
On Fri, Jan 05, 2001 at 02:12:04PM -0500, Brian Reichert wrote: I'm chasing down a syslogd problem on a 3.4-R box, only to discover that I'm being bit (still!) by a PR I submitted two years ago: http://www.FreeBSD.org/cgi/query-pr.cgi?pr=8865 I'm responsible for a wad of machines hanging off of a terminal server. - I wanted syslog messages reported to the console, for revealing critical errors. - Due to cabling and the terminal server itself, using Big Digi hardware, I need to have getty running off of cuaa0, not ttyd0. Apparently, in three versions of FreeBSD, this is _still_ a problem. Does anyone have any insight on this? I have a wee bit more insight on this. The gotcha seems to involve getty vs ttyd0 and cuaa0. I want to accomplish at least these things (a bit more fleshed out): - boot messages to the serial port (hence, a serial console) - a login prompt (hence, I need getty running) - syslog logging to /dev/console (as opposed to root's tty) - the general ability to write to the console directly (ie: /bin/echo 'test to console' /dev/console) - due to serial cabling issues out of my control, it appears that I need getty attached to cuaa0, rather than ttyd0. (The test box below doesn't have this restriction, but I'm trying to spec several boxes in the data center, and there seem to be some variability in the cables that are resolved in using cuaa0.) I have a 3-4.RELEASE box, with a serial console. mdb1# dmesg | grep sio0 sio0 at 0x3f8-0x3ff irq 4 flags 0x10 on isa sio0: type 16550A, console My observations so far: - If getty is not running at all on the serial device, then both syslogd and direct writes to /dev/console just work. - If getty is running on cuaa0, writes to the console by either syslogd or a direct write block. 'ps' shows the process's state as 'I', and it's flags are '86', neither of which reveals much info. :/ (Advice is welcome about getting more info without 'ktrace'...) - If getty is running on ttyd0, then the direct writes work, but syslog doesn't. So - it would seem that out-of-the-box, FreeBSD can't be used adequately in a headless environment, as much as it pains me to state as much. In researching the mailing list archives (well, several lists, but you know what I mean), it would seem people have been running into problems associated with these issues for a couple of years now, over a few versions of FreeBSD. - Is anyone actually able to use FreeBSD in a headless environment with impunity, as per my needs above? If so, specs of hardware/software would be most welcome. - Any advice on kernel/device driver tweaking to resolve the blocking issues would also be appreciated... - What would the ramifications be of running getty on /dev/console? There seem to be a line in /etc/ttys for /dev/console, but I can't fathom why it's there... -- Brian 'you Bastard' Reichert[EMAIL PROTECTED] 37 Crystal Ave. #303Daytime number: (603) 434-6842 Derry NH 03038-1713 USA Intel architecture: the left-hand path To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Clustering FreeBSD
Hi, Does anyone have any details of Open Source, or software included with FreeBSD that allows the clustering of FreeBSD? I have 55 racks sitting here to play with, and want to start doing some serious work (for me anyway!) with fBSD Plz. let me know! :) Thanks, -- Jamie Heckford Chief Network Engineer Psi-Domain - Innovative Linux Solutions. Ask Us How. = email: [EMAIL PROTECTED] web:http://www.psi-domain.co.uk/ tel:+44 (0)1737 789 246 fax:+44 (0)1737 789 245 mobile: +44 (0)7866 724 224 = To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Mounting a CDROM in freeBSD 4.2
and you must make sure your kernel is compiled with options CD9660 At 18:08 16/01/01 +0100, Philippe CASIDY wrote: The naming of the cdrom has changed from 3.x to 4.x. I do not remember the old name but the new name is /dev/acd0c for an ATAPI cdrom. So you must have in /etc/fstab something like... /dev/acd0c /cdrom cd9660 ro,noauto 0 0 Maybe you encounter this kind of trouble. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Broken-by-design USB device?
On Fri, 12 Jan 2001, Nick Hibma wrote: If you could send me the make and model (basically all the numbers (including the FCC one) on the label on the device, that would be appreciated. Heh, this is some imported piece of junk. There is no FCC id. All the text on the adapter says is: PS-PC USB CONVERTOR XK-PC2003 The box says the same except a different part number XK-PC2002. No UPC, no identifying features, nothing. I'll have a look around to see whether I can find another one. We have a PlayStation 2 Developer's Kit in the office, so I'm interested to see the controllers work. We develop a game for PlayStation 2 and Windows (but it runs on FreeBSD as well :-), so being able to use the gamepad converter on FreeBSD would be a laugh. Hm, is it one of these? Nope, I can't find it anywhere. I've confirmed on a couple other boxes that this adapter really does cause some problems for some reason. I plugged it into another test machine running 4.2-RELEASE and: Jan 15 17:38:44 fileserver /kernel: uhid0: vendor 0x product 0x0667, rev 1.00/2.88, addr 2, iclass 3/0 Jan 15 17:38:44 fileserver /kernel: uhid0: no report descriptor Jan 15 17:38:44 fileserver /kernel: device_probe_and_attach: uhid0 attach returned 6 Jan 15 17:43:08 fileserver /kernel: Copyright (c) 1992-2000 The FreeBSD Project. For some reason the machine rebooted just after I unplugged the USB thing. Send me your address and I'll mail this thing off to you, make it a lot easier to debug. --- Jon Simola [EMAIL PROTECTED] | "In the near future - corporate networks Systems Administrator | reach out to the stars, electrons and light ABC Communications | flow throughout the universe." -- GITS To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Clustering FreeBSD
* Jamie Heckford [EMAIL PROTECTED] [010116 09:29] wrote: Hi, Does anyone have any details of Open Source, or software included with FreeBSD that allows the clustering of FreeBSD? I have 55 racks sitting here to play with, and want to start doing some serious work (for me anyway!) with fBSD Plz. let me know! :) There's a couple of things in ports (do a search) to do this, they seem to be a bit underpowered at the moment, there's also a few pretty powerful commercial packages out there, you can probably find them on the vendors' pages here: http://www.freebsd.org/commercial/software_bycat.html best of luck, -- -Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
NFS_ROOT not working when using a Netapp server
Hi, Has anyone here sucessfully used a Netapp fileserver as the NFS root filesystem for FreeBSD clients? My FreeBSD client basically mounts the Netapp, boots the kernel, but fails early in /etc/rc because /dev/mem, /dev/kmem, /dev/null (and friends) are unavailable. NOTE that this all works fine when a FreeBSD box is used as the NFS root server, but everything else being the same. The client is mounting an image built from -STABLE sources late last week. Here's what I'm seeing when the client boots -v: SMAP type=01 base= len= 000a SMAP type=01 base= 0010 len= 07f0 SMAP type=02 base= fff8 len= 0008 Copyright (c) 1992-2001 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.2-STABLE #1: Tue Jan 16 12:51:42 EST 2001 root@tribble:/usr/src/sys/compile/DISKLESS Calibrating clock(s) ... TSC clock: 264902265 Hz, i8254 clock: 1193253 Hz CLK_USE_I8254_CALIBRATION not specified - using default frequency Timecounter "i8254" frequency 1193182 Hz CLK_USE_TSC_CALIBRATION not specified - using old calibration method Timecounter "TSC" frequency 264887585 Hz CPU: Pentium II/Pentium II Xeon/Celeron (264.89-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x633 Stepping = 3 Features=0x80f9ffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,MMX real memory = 134217728 (131072K bytes) Physical memory chunk(s): 0x1000 - 0x0009, 651264 bytes (159 pages) 0x00361000 - 0x07ff7fff, 130641920 bytes (31895 pages) avail memory = 127270912 (124288K bytes) bios32: Found BIOS32 Service Directory header at 0xc00ffe80 bios32: Entry = 0xffe90 (c00ffe90) Rev = 0 Len = 1 pcibios: PCI BIOS entry at 0xcc1e pnpbios: Found PnP BIOS data at 0xc00fe2d0 pnpbios: Entry = f:e2f4 Rev = 1.0 Other BIOS signatures found: ACPI: Preloaded elf kernel "kernel" at 0xc033b000. Pentium Pro MTRR support enabled md0: Malloc disk Creating DISK md0 Math emulator present ... lot's more boot verbosity ... Mounting root from nfs: NFS ROOT: AA.BB.CC.DD:/vol/nfsroot/img3 start_init: trying /sbin/init crw-rw-rw- 1 root wheel0, 0x00080002 Jan 16 11:35 /dev/null /etc/rc: cannot create /dev/null: no such device or address Enter full pathname of shell or RETURN for /bin/sh: # dmesg dmesg: /dev/mem: Device not configured # echo foo /dev/null cannot create /dev/null: no such device or address # ls -l /dev/null crw-rw-rw- 1 root wheel0, 0x00080002 Jan 16 11:35 /dev/null # ls -l /dev/mem crw-r- 1 root kmem0, 0x0008 Jan 15 13:28 /dev/mem # df -k . Filesystem 1K-blocks UsedAvail Capacity Mounted on AA.BB.CC.DD:/vol/nfsroot/img3 15813736 2746140 1306759617%/ I can provide more boot verbosity upon request. Any ideas as to what the problem might be? Thanks, -Brian -- Brian Dean [EMAIL PROTECTED] [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: adding an address family
Mark Santcroos wrote: Hi, I wonder if it is possible to dynamicly add an address family from a kernel module. I ask this because I am working on IrDA support for FreeBSD. I want to create AF_IRDA and all the corresponding structures and functions. So would it be possible to add another network stack at runtime or is the code not ready for that? we do this in ng_socket.c where we add our own protocol. we even export the number of the protocol and domain to userland with sysctls so one COULD run a program which doesn't know in advance what the protocol and domain numbers are.. Thanks Mark -- Mark Santcroos RIPE Network Coordination Centre PGP KeyID: 1024/0x3DCBEB8D PGP Fingerprint: BB1E D037 F29D 4B40 0B26 F152 795F FCAB 3DCB EB8D To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message -- __--_|\ Julian Elischer / \ [EMAIL PROTECTED] ( OZ) World tour 2000 --- X_.---._/ from Perth, presently in: Budapest v To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Clustering FreeBSD
On 16 Jan, Jamie Heckford wrote: Hi, Does anyone have any details of Open Source, or software included with FreeBSD that allows the clustering of FreeBSD? I have 55 racks sitting here to play with, and want to start doing some serious work (for me anyway!) with fBSD Plz. let me know! :) I've been working on some stuff for over a year, but it nowhere near anything. What was it you were planning on doing? Jessem. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
[CFR] number of processes forked since boot
Hi, I received the patch to add counter for fork() set from Paul. I've tested it on my -CURRENT and -STABLE boxes, and it seems fine for me. So, I post his patch for review. Thanks, Paul. fork.patch.gz Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan [EMAIL PROTECTED] [EMAIL PROTECTED] ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/
Re: adding an address family
On Tue, Jan 16, 2001 at 10:22:12AM -0800, Julian Elischer wrote: So would it be possible to add another network stack at runtime or is the code not ready for that? we do this in ng_socket.c where we add our own protocol. Thanx, I didn't thought on the netgraph code. Is this likely going to replace all the implementations of the current supported network protocols? In other words, is netgraph the right way to go for me, or should I rather focus on the more static part and drop the idea of implementing it as a kernel module? Mark -- Mark Santcroos RIPE Network Coordination Centre PGP KeyID: 1024/0x3DCBEB8D PGP Fingerprint: BB1E D037 F29D 4B40 0B26 F152 795F FCAB 3DCB EB8D To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: One thing linux does better than FreeBSD...
Poul-Henning Kamp wrote: Isn't there *anybody* here who has a SO/family member/neighbor in the graphic/design business ? I do, but they almost never work for free. I did convince a friend of mine (a great artist, who has done some comic books and other stuff) to do this back of a t-shirt: http://www.cstone.net/~highway/tshirt/chuugtee.jpg (For those of you not familiar with the University of Virginia, the building in the background is the Rotunda.) Part of his problem is he's such a perfectionist that he hates to do anything "wrong" and keeps fiddling with it for hours and hours. :-) His website is here: http://www.drquark.com/ SeanMike -- SeanMike Whipkey - "The Man. The goatee. The reputation." - Kimmet "What the hell is wrong with that boy?!?" - Adrienne Uphoff "What the French lack in reason they make up for in sheer gall." - Onion "Did anyone else read this and think of SeanMike?" - Leybourne To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: NFS_ROOT not working when using a Netapp server
* Brian Dean [EMAIL PROTECTED] [010116 10:17] wrote: Hi, Has anyone here sucessfully used a Netapp fileserver as the NFS root filesystem for FreeBSD clients? My FreeBSD client basically mounts the Netapp, boots the kernel, but fails early in /etc/rc because /dev/mem, /dev/kmem, /dev/null (and friends) are unavailable. This is expected, NFS doesn't provide a name-major/minor mapping system and as such each OS must provide its own devices heirarchy for it to work. Some suggestions are using an mfs /dev and creating the device nodes in there, or making a filesystem via the "vn" device and mounting a vn device over NFS. Honestly I haven't really done anything with NFSroot, but these options would probably work, you might also have luck looking in the mailing list archives and reading the DISKLESS(8) manpage. best of luck, -- -Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
RE: Clustering FreeBSD
The first question I have when someone brings this up is, "please define what you mean by clustering". There are multiple interpretations. Can you elaborate? -Charles -Original Message- From: Jamie Heckford [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 16, 2001 10:37 AM To: [EMAIL PROTECTED] Subject: Clustering FreeBSD Hi, Does anyone have any details of Open Source, or software included with FreeBSD that allows the clustering of FreeBSD? I have 55 racks sitting here to play with, and want to start doing some serious work (for me anyway!) with fBSD Plz. let me know! :) Thanks, -- Jamie Heckford Chief Network Engineer Psi-Domain - Innovative Linux Solutions. Ask Us How. = email: [EMAIL PROTECTED] web:http://www.psi-domain.co.uk/ tel:+44 (0)1737 789 246 fax:+44 (0)1737 789 245 mobile: +44 (0)7866 724 224 = To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: [CFR] number of processes forked since boot
* Hajimu UMEMOTO [EMAIL PROTECTED] [010116 10:33] wrote: Hi, I received the patch to add counter for fork() set from Paul. I've tested it on my -CURRENT and -STABLE boxes, and it seems fine for me. So, I post his patch for review. Thanks, Paul. I like this a lot. -- -Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Clustering FreeBSD
In all honesty, I am just looking for something to play with and see how fast FreeBSD can go. Sort of thing where those two guys clustered about 200 486's or something stupid like that.. :) Jamie On 2001.01.16 18:31:43 + [EMAIL PROTECTED] wrote: On 16 Jan, Jamie Heckford wrote: Hi, Does anyone have any details of Open Source, or software included with FreeBSD that allows the clustering of FreeBSD? I have 55 racks sitting here to play with, and want to start doing some serious work (for me anyway!) with fBSD Plz. let me know! :) I've been working on some stuff for over a year, but it nowhere near anything. What was it you were planning on doing? Jessem. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Clustering FreeBSD
%In all honesty, I am just looking for something to play %with and see how fast FreeBSD can go. % %Sort of thing where those two guys clustered about 200 486's %or something stupid like that.. Go to google and search for Beowulf. Or Mosix. Or Ron Minnich :-) Or "smart networks", if all you want to do is serve up web pages. Russell %:) % %Jamie % %On 2001.01.16 18:31:43 + [EMAIL PROTECTED] wrote: % % % On 16 Jan, Jamie Heckford wrote: % Hi, % % Does anyone have any details of Open Source, or software included % with FreeBSD that allows the clustering of FreeBSD? % % I have 55 racks sitting here to play with, and want to start doing % some serious work (for me anyway!) with fBSD % % Plz. let me know! :) % % I've been working on some stuff for over a year, but % it nowhere near anything. What was it you were planning on doing? % % Jessem. % % % % % % % % %To Unsubscribe: send mail to [EMAIL PROTECTED] %with "unsubscribe freebsd-hackers" in the body of the message % To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: NFS_ROOT not working when using a Netapp server
# ls -l /dev/null crw-rw-rw- 1 root wheel0, 0x00080002 Jan 16 11:35 /dev/null # ls -l /dev/mem crw-r- 1 root kmem0, 0x0008 Jan 15 13:28 /dev/mem # df -k . mass:~ls -l /dev/null crw-rw-rw- 1 root wheel2, 2 Jan 16 12:20 /dev/null mass:~ls -l /dev/mem crw-r- 1 root kmem2, 0 Nov 22 1999 /dev/mem What did you use to actually create your exported /dev on the NetApp in the first place? Encoding of device major/minor numbers is funky with NFS, and FreeBSD only does NFSv2 for the root filesystem by default (which makes matters even worse). If you didn't, try making the exported /dev with a FreeBSD client. If that still fails (wouldn't surprise me all that much), you want to be using an MFS or md-mounted /dev. The standard rc.diskless stuff works OK, but I don't like MFS all that much, so I rewrote it slightly to use md. See http://ziplok.dis.org/msmith/rc.diskless*.diff (could do with some polishing). -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: how to test out cron.c changes? (was: cvs commit: src/etc crontab)
On Wed, Jan 10, 2001 at 08:51 +1000, Greg Black wrote: If any change to expected cron behaviour is to be introduced, the traditional behaviour must be the default, with a knob documented in the man pages that can be twisted to get the oddball behaviour that is being proposed here. In http://www.freebsd.org/cgi/query-pr.cgi?pr=24358 ("/etc/rc variables for cron(8)") I suggest how to provide knobs to pass parameters to cron as well as to switch to a different cron executable, while of course leaving current behaviour as the default. This is meant for those who feel a change to be necessary or highly desirable. No matter how soon "DST solutions" will be available and what they will look like. This opens the opportunity to use a cron daemon from ports as well as settling another - maybe repo copied - cron variant in the FreeBSD tree (although I fail to estimate how probable this is to happen). For highly involved developers this opens the opportunity to plug in an own cron version or to pass options to locally modified sources. But I recognize that there are strong concerns about touching the current src/usr.sbin/cron tree -- it is expected to be broken by being touched. For whatever the definition of "broken" might be: deviation from expected behaviour or introduction of real bugs. I feel that the proposed extension will contribute to everybody's satisfaction ... virtually yours 82D1 9B9C 01DC 4FB4 D7B4 61BE 3F49 4F77 72DE DA76 Gerhard Sittig true | mail -s "get gpg key" [EMAIL PROTECTED] -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: how to test out cron.c changes? (was: cvs commit: src/etc crontab)
Gerhard Sittig wrote: On Wed, Jan 10, 2001 at 08:51 +1000, Greg Black wrote: If any change to expected cron behaviour is to be introduced, the traditional behaviour must be the default, with a knob documented in the man pages that can be twisted to get the oddball behaviour that is being proposed here. In http://www.freebsd.org/cgi/query-pr.cgi?pr=24358 ("/etc/rc variables for cron(8)") I suggest how to provide knobs to pass parameters to cron as well as to switch to a different cron executable, while of course leaving current behaviour as the default. This looks fine to me, as far as it goes. I'm assuming here that the proposed new behaviour for cron will only be enabled if a specific flag is provided? To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Clustering FreeBSD
On Tue, Jan 16, 2001 at 05:36:51PM +, Jamie Heckford wrote: Does anyone have any details of Open Source, or software included with FreeBSD that allows the clustering of FreeBSD? Install the pvm port (ports/net/pvm) on the machines. I've played around with this a bit, and it's quite fun to watch. Check out the X11 fractal demo ("xep"). There's also a port of povray (ports/graphics/pvmpov) which uses PVM to distribute it's processing. Links: http://acme.ecn.purdue.edu/ - Beowulf-style cluster using FreeBSD http://www.beowulf.org/ - more Beowulf-style clusters http://www.epm.ornl.gov/pvm/pvm_home.html http://www.netlib.org/pvm3/book/pvm-book.html - PVM information -- [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Clustering FreeBSD
Jamie Heckford wrote: # Hi, # Does anyone have any details of Open Source, or software included # with FreeBSD that allows the clustering of FreeBSD? Maybe you mean something like this... http://acme.ecn.purdue.edu/index.html ?! Uwe To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: adding an address family
Mark Santcroos wrote: On Tue, Jan 16, 2001 at 10:22:12AM -0800, Julian Elischer wrote: So would it be possible to add another network stack at runtime or is the code not ready for that? we do this in ng_socket.c where we add our own protocol. Thanx, I didn't thought on the netgraph code. Is this likely going to replace all the implementations of the current supported network protocols? In other words, is netgraph the right way to go for me, or should I rather focus on the more static part and drop the idea of implementing it as a kernel module? I don't know.. I don't know what you need :-) I was just suggesting that we made a new loadable protocol in netgraph that you could use as an example. Of course it IS possible that you could do what you want using netgraph but since I don't know what that is, I can't judge. Mark -- Mark Santcroos RIPE Network Coordination Centre PGP KeyID: 1024/0x3DCBEB8D PGP Fingerprint: BB1E D037 F29D 4B40 0B26 F152 795F FCAB 3DCB EB8D -- __--_|\ Julian Elischer / \ [EMAIL PROTECTED] ( OZ) World tour 2000 --- X_.---._/ from Perth, presently in: Budapest v To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: NFS_ROOT not working when using a Netapp server
On Tue, Jan 16, 2001 at 12:27:31PM -0800, Mike Smith wrote: What did you use to actually create your exported /dev on the NetApp in the first place? Encoding of device major/minor numbers is funky with NFS, and FreeBSD only does NFSv2 for the root filesystem by default (which makes matters even worse). I created the client's /dev entries by mounting the netapp from another FreeBSD box, chroot'ing to the top of the client's root tree, then "cd /dev sh MAKEDEV all". However, this was done with an NFS V3 mount and as you observed, FreeBSD uses NFSv2 for the root. After repeating this same same procedure using an NVSv2 mount to the Netapp, the major/minor numbers look a whole lot better and it now works just fine. It's odd, though, that the NFSv2 and NFSv3 handle these aspects of of the inode so differently. I wonder if this is a bug, and if so, is it Netapp's or ours? It is interesting to note that this mangling does not occur when FreeBSD is both the client and the server. -Brian -- Brian Dean [EMAIL PROTECTED] [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: NFS_ROOT not working when using a Netapp server
However, this was done with an NFS V3 mount and as you observed, FreeBSD uses NFSv2 for the root. After repeating this same same procedure using an NVSv2 mount to the Netapp, the major/minor numbers look a whole lot better and it now works just fine. It's odd, though, that the NFSv2 and NFSv3 handle these aspects of of the inode so differently. I wonder if this is a bug, and if so, is it Netapp's or ours? It is interesting to note that this mangling does not occur when FreeBSD is both the client and the server. It's a "feature" of the way that the NetApp box stores the major/minor numbers, and not really a bug per se. FreeBSD has somewhat different expectations of major/minor number storage as compared to some other platforms, and the interactions are not well defined. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
cvsup7.freebsd.org downtime for upgrades
CVSup7.FreeBSD.org will be down for at least a few hours this afternoon (Pacific time) so that we can perform a hardware upgrade. It may be down again later in the week as we rearrange things on the disks and bring the OS up to date. Thanks in advance for your patience. John -- John Polstra [EMAIL PROTECTED] John D. Polstra Co., Inc.Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: [CFR] number of processes forked since boot
On Wed, 17 Jan 2001, Hajimu UMEMOTO wrote: I received the patch to add counter for fork() set from Paul. I've tested it on my -CURRENT and -STABLE boxes, and it seems fine for me. So, I post his patch for review. I do have a change (I knew I forgot something.) This is exactly the same patch, but counts kernel thread forks to boot. I've tested it on -CURRENT and seems fine for me as well. -Paul. fork_kthreads.patch.gz
Re: adding an address family
On Tue, Jan 16, 2001 at 01:01:54PM -0800, Julian Elischer wrote: Is this likely going to replace all the implementations of the current supported network protocols? In other words, is netgraph the right way to go for me, or should I rather focus on the more static part and drop the idea of implementing it as a kernel module? I don't know.. I don't know what you need :-) Hi, Ok I'm trying to make a port of the IrDA stack on Linux to FreeBSD. I've now written the driver for the chipset on my laptop, and I am ready with that to pass data to an upper layer. In Linux IrDA is handled as AF_IRDA, so in userland you create an AF_IRDA socket just as you would do with a normal TCP/IP stack and then you can commnunicate with other IrDA devices. I had two questions: 1. How can I dynamicly implement a new network protocol as a kernel module. The answer for that one seems to be Netgraph Following to that one I had another question: 2. Is Netgraph going to be the future in FreeBSD network stacks. Iaw, will tcp/ip be based on Netgraph in the future or will it just be a nice extension but not more. The reason I ask it is this: Is it wise to implement my protocol based on Netgraph (so I can do it as a kernel module), or should I just build it into the kernel? I know; A lot of questions, but I sure need the help :-) (And wouldn't it be cool if we would have IrDA support?) Mark -- Mark Santcroos RIPE Network Coordination Centre PGP KeyID: 1024/0x3DCBEB8D PGP Fingerprint: BB1E D037 F29D 4B40 0B26 F152 795F FCAB 3DCB EB8D To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: One thing linux does better than FreeBSD...
On Tue, 16 Jan 2001, Poul-Henning Kamp wrote: Isn't there *anybody* here who has a SO/family member/neighbor in the graphic/design business ? Yes. http://www.svaha.net/daemon/index.html -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | [EMAIL PROTECTED] | 2 x '84 Volvo 245DL| ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
SIGBUS when writing to mmap'd device memory...
All, I'm trying to mmap() a region of device memory into user space. When the user app tries to write to the page, I'm getting a SIGBUS. My code in foo_mmap() looks essentially like: ... voff = bhandle + client_offset; poff = vtophys(voff); return i386_btop(poff); I know that voff is fine as I can write in the kernel to that address and the right things happen. Any ideas? Anything I can do to help narrow down the cause? Thanks, -JohnG To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: One thing linux does better than FreeBSD...
Am I the only one who thinks that he's just too cute? I mean- I view FreeBSD as a potent force that follows it's directives with razorlike precision and bleeding speed. Somehow this is not embodied by a "cute" daemon. I mean he IS a daemon! Come on! I've got a few GD friends, I'll sic them to work on a MEANER version... -- "Jupiter accepts your offer..." AIM: IMFDUP - Original Message - From: Matthew N. Dodd [EMAIL PROTECTED] To: Poul-Henning Kamp [EMAIL PROTECTED] Cc: Wilko Bulte [EMAIL PROTECTED]; Dag-Erling Smorgrav [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 16, 2001 2:24 PM Subject: Re: One thing linux does better than FreeBSD... On Tue, 16 Jan 2001, Poul-Henning Kamp wrote: Isn't there *anybody* here who has a SO/family member/neighbor in the graphic/design business ? Yes. http://www.svaha.net/daemon/index.html -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | [EMAIL PROTECTED] | 2 x '84 Volvo 245DL| ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: libc walkthrough?
Jeroen Ruigrok van der Werven wrote: -On [20010115 12:25], Rasputin ([EMAIL PROTECTED]) wrote: Ok, I know that The Bible for *BSDs is "TDaIotFOS", but STR from a glance at the 4.3 version that it is very kernel-oriented. I'd like to get started by porting a few userland apps (have my sights on cdparanoia for starters), so was wondering if anyone could recommend a good book to introduce newbies to the BSD C library - I know the manpages are more up to date, but I can't read them on the bus.. Advanced UNIX Programming, by Warren W. Gay. To follow up after Stevens APUE. Porting UNIX Software, O'Reilly Associates. The author is some goofball named Greg Lehey. Hi grog! -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC [EMAIL PROTECTED] http://softweyr.com/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Mounting a CDROM in freeBSD 4.2
I'd like to thank every one who responded, and all those who were willing to respond but saw that they would be repeating information already sent. It turns out that the designation of the CDROM drive changed between versions 3.3 and 4.2 , and the only one I knew was the designation of the CDROM drive for version 3.3 . I did a grep -i cdrom *.TXT on the files ABOUT.TXT INSTALL.TXT README.TXTTROUBLE.TXT ERRATA.TXTLAYOUT.TXTRELNOTES.TXT UPGRADE.TXT and found no mention of the designation of the CDROM drive, so I am glad that a couple of responders sent it to me. I would like to know how they found out this tidbit of information so I'll know where to look for it in the future. I would suggest that there be a man page listing all the drive designations ( CDROM , A , B [if one has it] , IDE [or other] drive D , etc. , SCSI drives ) and this man page should be referenced as a "SEE ALSO" in all the mount man pages . Possibly it could be like Greg Lehey's table 13.5 except that it should be more complete. _ Get your FREE download of MSN Explorer at http://explorer.msn.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: One thing linux does better than FreeBSD...
Am I the only one who thinks that he's just too cute? Well, either that or a bit too much like Al Jolson in blackface (redface?). I mean he IS a daemon! Come on! I've got a few GD friends, I'll sic them to work on a MEANER version... Go for it! We did a version of him here holding a smoking AK-47 and looking positively demented and it was one of the most popular renderings at the office. :-) - Jordan To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: One thing linux does better than FreeBSD...
On 17-Jan-01 Jordan Hubbard wrote: Am I the only one who thinks that he's just too cute? Well, either that or a bit too much like Al Jolson in blackface (redface?). I mean he IS a daemon! Come on! I've got a few GD friends, I'll sic them to work on a MEANER version... Go for it! We did a version of him here holding a smoking AK-47 and looking positively demented and it was one of the most popular renderings at the office. :-) Where did that sneak off to, btw? That definitely deserves to be a T-shirt. - Jordan -- John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: One thing linux does better than FreeBSD...
Hey! These images are hip! :-) Cheers, Bosko. Matthew N. Dodd wrote: On Tue, 16 Jan 2001, Poul-Henning Kamp wrote: Isn't there *anybody* here who has a SO/family member/neighbor in the graphic/design business ? Yes. http://www.svaha.net/daemon/index.html -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | [EMAIL PROTECTED] | 2 x '84 Volvo 245DL| ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: cvsup7.freebsd.org downtime for upgrades
In article [EMAIL PROTECTED], John Polstra [EMAIL PROTECTED] wrote: CVSup7.FreeBSD.org will be down for at least a few hours this afternoon (Pacific time) so that we can perform a hardware upgrade. It may be down again later in the week as we rearrange things on the disks and bring the OS up to date. Thanks in advance for your patience. This has unfortunately escalated to "downtime for repairs." :-( CVSup7 will be down for at least a few days. People who rely on it should switch to one of the other mirrors for the time being. There are 14 others (cvsup1 - cvsup15) in the US to choose from. I apologize for the inconvenience. The NetBSD, OpenBSD, and gcc collections which existed only on cvsup7 will be unavailable until it comes back up. John -- John Polstra [EMAIL PROTECTED] John D. Polstra Co., Inc.Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
tasteless?
Re: One thing linux does better than FreeBSD...
Unless the network is lying to me again, Matthew N. Dodd said: On Tue, 16 Jan 2001, Poul-Henning Kamp wrote: Isn't there *anybody* here who has a SO/family member/neighbor in the graphic/design business ? Yes. http://www.svaha.net/daemon/index.html BUT HIS NAME IS NOT CHUCK, DAMNIT! AlanC To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: cvsup7.freebsd.org downtime for upgrades
On Tue, Jan 16, 2001 at 05:41:39PM -0800, John Polstra wrote: In article [EMAIL PROTECTED], John Polstra [EMAIL PROTECTED] wrote: CVSup7.FreeBSD.org will be down for at least a few hours this afternoon (Pacific time) so that we can perform a hardware upgrade. It may be down again later in the week as we rearrange things on the disks and bring the OS up to date. Thanks in advance for your patience. This has unfortunately escalated to "downtime for repairs." :-( CVSup7 will be down for at least a few days. People who rely on it should switch to one of the other mirrors for the time being. There are 14 others (cvsup1 - cvsup15) in the US to choose from. I apologize for the inconvenience. The NetBSD, OpenBSD, and gcc collections which existed only on cvsup7 will be unavailable until it comes back up. cvsup12 carries OpenBSD.. Kris PGP signature
Protections on inetd (and /sbin/* /usr/sbin/* in general)
Background: We recently had a customer's web site suffer an attempted exploit via one of their cgi scripts. The attempted exploit involved writing a file into /tmp, then invoking inetd with that file to get a root shell on a non-standard port. While the exploit failed, they were able to write the file as user nobody and invoke inetd. There is not much we can do about that as long as we permit customers to use their own cgi scripts, which is a requirement with this type of account. Issue: The exploit managed to start inetd, camped on the specified port but inetd, properly, failed as soon as it tried to start the service (running as user nobody makes doing setuids difficult :-) Tests by our staff from the command line indicate that any user is able to start inetd with a local config file associating a service with a non standard port. It doesn't WORK but it does attach to the port. Leading to some DOS possibilities, albiet not very interesting ones. Recommendation: A number of the executables located in /sbin and /usr/sbin are never going to be invoked for any legitimate use by anyone other than the superuser. In particular, servers such as portmap and inetd run by non-root users are unlikely to do what was intended. It seems a prudent measure to simply not set execute permission by "other" on such programs during the install, giving the user a handy "Permission denied" message when such an attempt is made. For those reading quickly, I am NOT recommending removing execute permission on ALL of /sbin/* and /usr/sbin/*, only on programs such as "portmap", "inetd", "lpd", "syslogd", "halt", "reboot" and others which perform no useful function to normal users. /sbin/init already enforces this condition, how about expanding it? /\/\ \/\/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: cvsup7.freebsd.org downtime for upgrades
On Tue, Jan 16, 2001 at 06:47:14PM -0800, Kris Kennaway wrote: cvsup12 carries OpenBSD.. As the admin of cvsup.usa.openbsd.org/cvsup12, this is correct. :) -- wca PGP signature
Possible bug in /usr/bin/makewhatis.
I was doing some installworlds and got a bunch of 'gzcat: Broken pipe' errors at the very end when it was doing 'makewhatis' on various manual directories. I believe the problem is related to the makewhatis perl script closing the input descriptor before draining all the input, but not being a perl progammer I can't tell for sure. The place where the perl program appeared to be closing the input prematurely is here: # ``man'' style pages # : it takes you only half the user time, regexp is slow!!! if (/^\.SH/ /^\.SH[ \t]+["]?($section_name)["]?/) { #while(F) { last unless /^\./ } # Skip #chop; $list = $_; while(F) { last if /^\.SH[ \t]/;here chop; s/^\.IX\s.*//;# delete perlpod garbage s/^\.[A-Z]+[ ]+[0-9]+$//; # delete commands s/^\.[A-Za-z]+[ \t]*//; # delete commands s/^\.\\".*$//;#" delete comments s/^[ \t]+//; if ($_) { $list .= $_; $list .= ' '; } } out($list); close F; return 1; closing here ... Could someone take a look at that? There might be other places as well. Thanks! -Matt To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
*Help* Limits on FreeBSD
Hello I'm currently working on trying to raise limits on our FreeBSD machine from 1064 to 8192 or even higher for our chat service. I did this (which worked for the time being) sysctl -w kern.maxfiles: 8192 kern.maxfilesperproc: 4096 This raises the limits but when I compile the IRCd and have the (hard limit) to 4096 or 8192 or even higher the error comes back and says its still stuck on 1064 Someone told me to store these limits (above) in a etc/sysctl.conf file but when I went to etc that file wasn't in there .. do I have to newly create the file or should it already be there? What I'm trying to do is to set the limit HIGH enough for the chat service to allow 8,192 or more users to connect to our chat service (this limit is what I'm trying to set the kernel to not the 1064 limit) Thanks again for your help =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | Fallenstar CHAT Network | | "Supercharged for the 21st Century" | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= __ Do You Yahoo!? Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free! http://photos.yahoo.com/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Protections on inetd (and /sbin/* /usr/sbin/* in general)
Recommendation: A number of the executables located in /sbin and /usr/sbin are never going to be invoked for any legitimate use by anyone other than the superuser. In particular, servers such as portmap and inetd run by non-root users are unlikely to do what was intended. It seems a prudent measure to simply not set execute permission by "other" on such programs during the install, giving the user a handy "Permission denied" message when such an attempt is made. Since these files don't run with any extra privileges (i.e., they're not setuid or setgid), nothing stops a user from uploading their own copy and running it. Your proposal doesn't actually improve security; it just annoys the attacker. Whether this is a good thing or a waste of time is a matter of opinion; personally, I'm in the latter boat (i.e., I see no reason to do this). Dima Dorfman [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: What to do if a box is just frozen
On Mon, 15 Jan 2001 23:01:15 +0100, Thierry Herbelot [EMAIL PROTECTED] wrote: I've got a little application at work which can "just freeze" a 4.2-Release : the purpose of the application is just a packet blaster used for telecom equipement test (send as many UDP packets as ordered, on as many interfaces as there are on a machine). So, on my 4.2-R test box (no-thrills BX, P-III 700 intel box), I have some tens (around 30 of them) of such processes sending their packets, and after some time (I have to more precisely determine this "some time"), the box simply locks. I do not see any message on console. What network card(s) are you using? What other cards/devices are in the box? Can you send an NMI to the box? (NMI can usually be generated by pulling I/0 channel check on the ISA bus low. I/0 channel check is pin A1 (and there's a convenient ground on pin B1). ([AB]1 is the pins closest to the rear of the machine). NMI should trap to DDB. Peter To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Permissions on crontab..
Why is crontab suid root? I say to myself "To update /var/cron/tabs/ and to signal cron". Could crontab run suid 'cron'? If those are the only two things it needs to do, run cron as gid 'cron' and make /var/cron/tabs/ group writable by 'cron'. -- Michael Bacarella [EMAIL PROTECTED] Technical Staff / New York Connect.Net, Ltd Daytime Phone: (212) 581-2831 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Permissions on crontab..
Michael Bacarella wrote: Why is crontab suid root? It has to run jobs as the correct user and must be able to setuid accordingly. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: adding an address family
[cc'ed to Benno for his fun and entertainment] On Tue, Jan 16, 2001 at 11:23:26PM +0100, Mark Santcroos scribbled: | On Tue, Jan 16, 2001 at 01:01:54PM -0800, Julian Elischer wrote: | Is this likely going to replace all the implementations of the current | supported network protocols? | | In other words, is netgraph the right way to go for me, or should I rather | focus on the more static part and drop the idea of implementing it as a | kernel module? | | Ok I'm trying to make a port of the IrDA stack on Linux to FreeBSD. | I've now written the driver for the chipset on my laptop, and I am ready | with that to pass data to an upper layer. Basically, we really do not want the Linux solution of doing IrDA. Using Netgraph would be much simpler. Email me and I will let you into my CVS repo of the IrDA ongoing work that Benno and I have done. Benno is working hard on FreeBSD/PPC kernel porting. I am doing the FreeBSD/PowerPC userland porting as well as I18N wchar* changes. Both of us are swamped, and the IrDA work has stagnated. I think we will gladly hand over the work. :) | In Linux IrDA is handled as AF_IRDA, so in userland you create an AF_IRDA | socket just as you would do with a normal TCP/IP stack and then you can | commnunicate with other IrDA devices. This "layering" scheme, is what Netgraph does. | I had two questions: | | 1. How can I dynamicly implement a new network protocol as a kernel | module. | The answer for that one seems to be Netgraph Netgraph ends all discussions. :) | Following to that one I had another question: | | 2. Is Netgraph going to be the future in FreeBSD network stacks. Iaw, will | tcp/ip be based on Netgraph in the future or will it just be a nice | extension but not more. Possibly, but why? TCP/IP can be very resource intensive. After all, we have systems designed to only do TCP/IP, servers. IrDA, at maximum performance, cannot be higher than ~4mbit/sec, compared to gigabit ethernet and ATM networks that FreeBSD supports. At such high levels of I/O and CPU time, we can afford to have TCP/IP services in the kernel. On the contrary, IrDA is ugly and should be organized by Netgraph. | The reason I ask it is this: Is it wise to implement my protocol based on | Netgraph (so I can do it as a kernel module), or should I just build it | into the kernel? Netgraph all the way. (/me pondering what Julian is thinking) IrDA is a bunch of messed up ugly protocols that can simply be different ng_* Netgraph nodes. | I know; A lot of questions, but I sure need the help :-) | (And wouldn't it be cool if we would have IrDA support?) Do you have the IrDA ISA driver? If so, for what chipset? Is yours the National Semiconductor Super IO chipsets? Can I see the IrDA ISA driver? :) -- +--+ | [EMAIL PROTECTED] | [EMAIL PROTECTED] | | http://peorth.iteration.net/~keichii | Yes, BSD is a conspiracy. | +--+ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Clustering FreeBSD
On Tue, Jan 16, 2001 at 05:36:51PM +, Jamie Heckford scribbled: | Does anyone have any details of Open Source, or software included | with FreeBSD that allows the clustering of FreeBSD? | | I have 55 racks sitting here to play with, and want to start doing | some serious work (for me anyway!) with fBSD Beowulf runs perfectly on FreeBSD. I've admined one such cluster. The stuff is all in the ports. And Beowulf is free, open source. Try PVM and MPICH. However, the real question here is: What do you want to do? Clustering does not really help a lot of things. You really need programs written with parallel computing in mind. www.beowulf.org -- +--+ | [EMAIL PROTECTED] | [EMAIL PROTECTED] | | http://peorth.iteration.net/~keichii | Yes, BSD is a conspiracy. | +--+ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Permissions on crontab..
In the last episode (Jan 17), Greg Black said: Michael Bacarella wrote: Why is crontab suid root? I say to myself "To update /var/cron/tabs/ and to signal cron". Could crontab run suid 'cron'? If those are the only two things it needs to do, run cron as gid 'cron' and make /var/cron/tabs/ group writable by 'cron'. It has to run jobs as the correct user and must be able to setuid accordingly. Not quite. As far as I can tell, crontab is setuid root for the sole purpose of being able to write to /var/cron/tabs. Cron checks the timestamp on the directory every minute, so crontab doesn't have to signal it for changes to get noticed. If you're paranoid, you can probably "chgrp cron /var/cron/tabs" and make crontab setgid cron without any ill effects. Cron itself must stay setuid root, of course, so it can run user crontabs as that user. Or it might need to be setuid for some other reason, since OpenBSD runs their crontab setuid root, and they usually are pretty security-paranoid. -- Dan Nelson [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Protections on inetd (and /sbin/* /usr/sbin/* in general)
The exploit managed to start inetd, camped on the specified port I guess, if it doesn't exist already, that it wouldn't be so hard to create a small patch to the kernel, so that only processes owned by root, or a certain group of users (let's say "daemon"), were allowed to set up listeners... walter -- Walter W. Hop [EMAIL PROTECTED] | +31 6 24290808 | NEW KEY: 0x84813998 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
syslogd patch
Printing out the whole path to the kernel all the time in syslog messages is a bit redundant and ugly, especially seeing that it isn't done for any other binaries. Should I send-pr this thing too, or is just sending it to -hackers enough? --- usr/src/usr.sbin/syslogd/syslogd.c.old Sat Jan 13 21:20:28 2001 +++ usr/src/usr.sbin/syslogd/syslogd.c Sat Jan 13 22:27:44 2001 @@ -734,8 +734,8 @@ int flags; { struct filed *f; - int i, fac, msglen, omask, prilev; - char *timestamp; + int i, fac, msglen, omask, prilev, bflen; + char *timestamp, *bfshort; char prog[NAME_MAX+1]; char buf[MAXLINE+1]; @@ -784,7 +784,16 @@ /* add kernel prefix for kernel messages */ if (flags ISKERNEL) { - snprintf(buf, sizeof(buf), "%s: %s", bootfile, msg); + /* ignore path to kernel */ + bflen = strlen(bootfile); + bfshort = bootfile; + while(bflen--) + if(*(bootfile+bflen) == '/') + { + bfshort = bootfile+bflen+1; + break; + } + snprintf(buf, sizeof(buf), "%s: %s", bfshort, msg); msg = buf; msglen = strlen(buf); } To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Permissions on crontab..
Dan Nelson wrote: In the last episode (Jan 17), Greg Black said: Michael Bacarella wrote: Why is crontab suid root? I say to myself "To update /var/cron/tabs/ and to signal cron". Could crontab run suid 'cron'? If those are the only two things it needs to do, run cron as gid 'cron' and make /var/cron/tabs/ group writable by 'cron'. It has to run jobs as the correct user and must be able to setuid accordingly. Not quite. As far as I can tell, crontab is setuid root for the sole purpose of being able to write to /var/cron/tabs. Cron checks the timestamp on the directory every minute, so crontab doesn't have to signal it for changes to get noticed. Previously, I wrote a bit faster than is good. There are indeed cron implementations where crontab signals cron, and they must be setuid root. However, as noted above, that's not the case with the current FreeBSD implementation. If you're paranoid, you can probably "chgrp cron /var/cron/tabs" and make crontab setgid cron without any ill effects. Cron itself must stay setuid root, of course, so it can run user crontabs as that user. At least I was not the only person to write hastily. It is not normal for cron to be setuid (and it is not on any BSD machine that I can check right now). It must be run by root, but that is accomplished by starting it from /etc/rc at boot time (or by root re-starting it as needed during normal operation). Dropping the setuid bit on crontab in favour of a setgid cron alternative also means changing the permissions on the /var/cron/tabs directory which is currently only accessible to root. I'm not sure I would want anybody else to have access there. But it would probably work OK. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: ISR not triggered upon the interrupts and OS hangs
Dear Freebsd Hackers, Here is a question regarding my bsd device drivers: I used the pci_map_int() to register an interrupt handler for my PCI device (intline = 12). But when the interrupt comes in, the handler (ISR) is not triggered at all. But the OS hangs and I can see continuous interrupts coming in on the PCI sniffer. You don't use pci_map_int() on any modern version of FreeBSD; you use bus_alloc_resource() and bus_setup_intr(). Since you don't mention which FreeBSD version you're using, it's hard to be of any more assistance. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
RE: syslogd patch
On 17-Jan-01 Eric Melville wrote: Printing out the whole path to the kernel all the time in syslog messages is a bit redundant and ugly, especially seeing that it isn't done for any other binaries. Should I send-pr this thing too, or is just sending it to -hackers enough? --- usr/src/usr.sbin/syslogd/syslogd.c.oldSat Jan 13 21:20:28 2001 +++ usr/src/usr.sbin/syslogd/syslogd.cSat Jan 13 22:27:44 2001 @@ -734,8 +734,8 @@ int flags; { struct filed *f; - int i, fac, msglen, omask, prilev; - char *timestamp; + int i, fac, msglen, omask, prilev, bflen; + char *timestamp, *bfshort; char prog[NAME_MAX+1]; char buf[MAXLINE+1]; @@ -784,7 +784,16 @@ /* add kernel prefix for kernel messages */ if (flags ISKERNEL) { - snprintf(buf, sizeof(buf), "%s: %s", bootfile, msg); + /* ignore path to kernel */ + bflen = strlen(bootfile); + bfshort = bootfile; + while(bflen--) + if(*(bootfile+bflen) == '/') + { + bfshort = bootfile+bflen+1; + break; + } + snprintf(buf, sizeof(buf), "%s: %s", bfshort, msg); You could use strrchr(3) here instead of rolling your own loop. However, this will print out 'kernel' for every kernel. If I 'boot kernel.foo' from the loader, then the bootfile will be /boot/kernel.foo/kernel, and this will trim the /boot/kenrel.foo/ part. The kernel.foo part is actually the important part, however, so I'd prefer it to not do this. -- John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Permissions on crontab..
On Wed 2001-01-17 (17:04), Greg Black wrote: In the last episode (Jan 17), Greg Black said: Michael Bacarella wrote: Why is crontab suid root? I say to myself "To update /var/cron/tabs/ and to signal cron". Could crontab run suid 'cron'? If those are the only two things it needs to do, run cron as gid 'cron' and make /var/cron/tabs/ group writable by 'cron'. It has to run jobs as the correct user and must be able to setuid accordingly. Not quite. As far as I can tell, crontab is setuid root for the sole purpose of being able to write to /var/cron/tabs. Cron checks the timestamp on the directory every minute, so crontab doesn't have to signal it for changes to get noticed. If you're paranoid, you can probably "chgrp cron /var/cron/tabs" and make crontab setgid cron without any ill effects. Cron itself must stay setuid root, of course, so it can run user crontabs as that user. Dropping the setuid bit on crontab in favour of a setgid cron alternative also means changing the permissions on the /var/cron/tabs directory which is currently only accessible to root. I'm not sure I would want anybody else to have access there. But it would probably work OK. You need only add group read and write permissions for the crontab group. Since noone is in the crontab group, unless they invoke crontab, noone will be gaining any "extra" privilege. I also toyed with making the directory sticky, and adding sanity checks to cron to not invoke tabs not owned by the user they refer to or root, or at least give warnings. FWIW, I had patches to convert 'at' and 'crontab' to being sgid-at and sgid-crontab ('at' has some really ugly macros that luckily aren't needed again). I'll probably be doing them again, now that my time is more sane. Neil -- Neil Blakey-Milner [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
LVS with FreeBSD
Hello, I am setting up a LVS/DR cluster with 2 nodes(FreeBSD), but It doesn't work. Here is my network configuration; Internet(203.231.63.70 is Virtual IP) | | Router (203.231.63.0/24 network) | | - eth0 : 203.231.63.74 LVS(Linux) | - eth1 : 203.231.63.70 (VIP) | -- || SVR1 SVR2 -- Real Servers are FreeBSD 4.2-RELEASE fxp0 : 203.231.63.70 203.231.63.70 (VIP) fxp1 : 203.231.63.71 203.231.63.72 (Real IP) ] in Load Valancing Server(203.231.63.74); [root@ha1 log]# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:10:5A:80:D7:FF inet addr:203.231.63.74 Bcast:203.231.63.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 eth1 Link encap:Ethernet HWaddr 00:10:5A:76:02:49 inet addr:203.231.63.70 Bcast:203.231.63.70 Mask:255.255.255.255 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:3924 Metric:1 [root@LVS /]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface 203.231.63.70 0.0.0.0 255.255.255.255 UH0 00 eth1 203.231.63.74 0.0.0.0 255.255.255.255 UH0 00 eth0 203.231.63.00.0.0.0 255.255.255.0 U 0 00 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 00 lo 0.0.0.0 203.231.63.254 0.0.0.0 UG0 00 eth0 [root@LVS /]# sysctl -p net.ipv4.ip_forward = 1 net.ipv4.conf.all.rp_filter = 1 net.ipv4.ip_always_defrag = 0 kernel.sysrq = 0 [root@LVS /]# vi /etc/ha.d/conf/ldirectord.cf timeout=3 checkinterval=5 autoreload=no fallback=127.0.0.1:80 virtual=203.231.63.70:80 real=203.231.63.71:80 gate 1 real=203.231.63.72:80 gate 1 service=http request="index.html" receive="Test Page" scheduler=rr protocol=tcp ] in Real Server(231.63.71,72); SVR1# ifconfig -a fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 203.231.63.70 netmask 0x broadcast 203.231.63.70 fxp1: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 203.231.63.72 netmask 0xff00 broadcast 203.231.63.255 SVR2 in the same way.. *** Problem: 1. LVS dosen't forward http request packet to the real server.. 2. I don't know how FreeBSD(real server) can avoid arp request.. About first problem: Client try to connect 203.231.63.70:80, but LVS doesn't reply to that SYN packet.. There are 2 things that seems odd.. First, When I start up ldirectord, output is like this.. [root@LVS /]# /etc/rc.d/init.d/ldirectord start Starting ldirectord [ OK ] [root@LVS /]# vi /var/log/ldirectord.log .. [Tue Jan 16 13:47:48 2001..] Starting Linux Director Daemon [Tue Jan 16 13:47:48 2001..] Adding virtual server: 203.231.63.70:80 [Tue Jan 16 13:47:48 2001..] Starting fallback server for: 203.231.63.70:80 [Tue Jan 16 13:47:49 2001..] Adding real server: 203.231.63.71:80 (1*203.231.63.70:80) [Tue Jan 16 13:47:49 2001..] Turning off fallback server for: 203.231.63.70:80 [Tue Jan 16 13:47:49 2001..] system(/sbin/ipvsadm -a -t 203.231.63.70:80 -R 203.231.63.72:80 -g -w 1) failed [Tue Jan 16 13:47:49 2001..] Adding real server: 203.231.63.72:80 (2*203.231.63.70:80) .. system(/sbin/ipvsadm -a -t 203.231.63.70:80 -R 203.231.63.72:80 -g -w 1) failed **Why this error occured?? What should I do to eliminate this error message?? Second, Here's my ipvsadm output: [root@LVS /]# ipvsadm -L -n IP Virtual Server version 0.9.7 (size=4096) Prot LocalAddress:Port Scheduler Flags - RemoteAddress:Port Forward Weight ActiveConn InActConn TCP 203.231.63.70:www rr - 255.255.255.255:52199 Masq4194304 0 0 Last output line seems wrong,, I think It should look like this.. right? TCP 203.231.63.70:www rr - 203.231.63.71:80route 1 0 0 - 203.231.63.72:80route 1 0 0 **How can I fix this thing?? Second problem: As you know.. in LVS cluster, real servers should not reply to arp request that asks VIP's MAC address.. Only LVS should reply to that arp request.. I have an idea about it.. Let the real server reply to client's arp request(for VIP) with LVS's hardware address.. then all client's packet that towards VIP go to the LVS.. That's a good idea.. so I commanded like this.. arp -s 203.231.63.70