ptys devfs
I. A session under screen, or sshd, or any another: netch@iv:~tty /dev/ttyp2 netch@iv:~ls -l /dev/tty /dev/ttyp2 crw--w 1 netch tty5, 2 Jun 24 13:09 /dev/tty crw--w 1 netch tty5, 2 Jun 24 13:09 /dev/ttyp2 root@iv:~##ls -l /dev/ttyp* crw--w 1 netch tty5, 2 Jun 24 13:09 /dev/ttyp2 crw--w 1 netch tty5, 3 Jun 24 13:09 /dev/ttyp3 Then try unlink /dev/ttyp2: root@iv:~##rm /dev/ttyp2 root@iv:~##ls -l /dev/ttyp* crw--w 1 netch tty5, 3 Jun 24 13:10 /dev/ttyp3 And then from first session: netch@iv:~tty not a tty netch@iv:~ls -l /dev/tty /dev/ttyp* crw--w 1 netch tty5, 2 Jun 24 13:10 /dev/tty crw--w 1 netch tty5, 3 Jun 24 13:10 /dev/ttyp3 Why it allows to unlink pty which in use? (The same with master pty: kernel allows to unlink used master pty.) When exit from the session and enter again, screen complaints: chown tty: No such file or directory. This shit keeps itself even if terminate screen and start it again: chown tty: No such file or directory Sorry, could not find a PTY. exit `mknod /dev/ttyp2 c 0 0' fixes it. But this logic is rather opaque: before screen's request, /dev/ttyp2 did not exist, but created on open(); but why it cannot be opened again now? And ptys which are already not used keeps themselves in /dev listing. II. fstat says strange `(11)' on all ptys, e.g.: netchfstat 126930 - - ?(11)- netchfstat 126931* pipe c870dc00 - c870df20 0 rw netchfstat 126932 - - ?(11)- netchfstat 126933 - - ?(11)- netchfstat 126934 - - ?(11)- But this fstat was run in terminal which: netch@iv:~tty /dev/ttyr0 netch@iv:~ls -l /dev/ttyr0 crw--w 1 netch tty5, 64 Jun 24 13:16 /dev/ttyr0 No experiments described above were performed upon /dev/ttyr0, it is kept virgin, with most of another ptys at this run. /netch To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Job Offer
Çäðàâñòâóéòå!! Âàñ ïðèâåòñòâóåò e-Marketing Center. Ïðåäëàãàåì Âàì ðåàëüíûå ñïîñîáû çàðîáîòêà. Êîíòåíò íàøåãî ïðåäëîæåíèÿ: -Multi-Level-Marketing-ïðîãðàììà ìãíîâåííîãî çàðîáîòêà -Âîçìîæíîñòü ïîëó÷åíèÿ áåñïëàòíûõ êàðò Visa, American Express, Master Card -Áåñïëàòíûå e-Marketing Books-òåõíîëîãèÿ ðàñïðîñòðàíåíèÿ è ïðîäàæè -Ëó÷øèå ïðîãðàììû ïðèâëå÷åíèÿ ðåôôåðàëîâ -Ïîäïèñêà íà ñðàññûëêó ïèñåì î âèðòóàëüíîì ìàðêåòèíãå-áåñïëàòíûå ðåêîìåíäàöèè è ò.ä. Ïîäðîáíàÿ èíôîðìàöèÿ íà íàøåì ñàéòå http://www.e-marketing.boom.ru Ñ óâàæåíèåì, e-Marketing Center = Ñîîáùåíèå ñãåíåðèðîâàíî ïî÷òîâîé ïðîãðàììîé äëÿ ðàññûëêè íîâîñòåé NewsMailer v1.3 Download: http://www.softtrade.ru/filez/emailer.zip Please go to http://www.softtrade.ru To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: [patch] netinet6/ip6_fw.c: use syslog for logging
Fri, 22 Jun 2001 20:06:34 +0900, Jun Kuriyama [EMAIL PROTECTED] said: kuriyama I found logs from ipfw(8) and ip6fw(8) are stored to different place. kuriyama Former one is into security.info via syslog(3) but latter one is kuriyama into kern.crit via kernel printf(). kuriyama The reason of this difference is came from missing merge from kuriyama ip_fw.c. And I hope this patch will be first step to synchronize kuriyama ip_fw.c and ip6_fw.c. kuriyama So, I made a patch to merge the difference revision 1.117 and 1.118 of kuriyama ip_fw.c into ip6_fw.c to use syslog(3) interface for ip6fw(8) logging. It seems fine to me. -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan [EMAIL PROTECTED] [EMAIL PROTECTED] ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: hints code bugs [Was: orm driver itches...]
Peter Wemm [EMAIL PROTECTED] wrote: Definately a bug. :-( The scanner is effectively concatenating the device.hints and the config hints together when enumerating them. Speaking about bugs in the hints processing: Triggered by Michael Reifenberger [EMAIL PROTECTED], i started experimenting to get fdc(4) working as a KLD. There are several resource deallocation things still wrong in it, but i have fixed a number of them in my private tree (and know about more of them...). So far, i've encountered two serious problems. First, when trying to load the KLD at run-time, it cannot allocate the IO ports for fdc0, and then registers successfully as fdc1 (but of course without any drive connected to it since there are none mentioned in the hints for fdc1). Michael wrote that loading the KLD by the boot loader works well, however. I gdb'ed a little around, and found that the resource allocator will eventually divert int pci_alloc_resources() when called on behalf of fdc0. Naturally, this function doesn't even know how to handle IO port allocation, thus fails. When called next time on behalf of fdc1, the device is however (mis?)detected as PnP, and all works out well. Does anybody have an idea why the code would believe fdc0 to be connected to the PCI bus? (The hints do say it's located on the ISA bus, of course.) Can anybody describe the rough picture how the `default' IO port allocation (range 0 .. ~0UL) is supposed to work at all? I'm a bit confused. Is it possible to modify the hints at run-time (i. e. before kldloading the module)? Second, the driver doesn't deallocate completely. When calling devinfo(1) after kldunloading it, i get a panic somewhere in the depths of kprintf(), where it is trying to print the device description of fdc1 (where the string dev-descr was pointing to has been kldunloaded since). What needs to be done in order to destroy the device structure completely, and which of those tasks is the kernel linker supposed to perform? In case anybody wants to give it a try, i'll append my private patches collected so far. -- cheers, Jorg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) Index: isa/fd.c === RCS file: /home/ncvs/src/sys/isa/fd.c,v retrieving revision 1.204 diff -u -u -r1.204 fd.c --- isa/fd.c2001/06/20 20:21:55 1.204 +++ isa/fd.c2001/06/24 17:28:58 @@ -170,6 +170,8 @@ struct callout_handle toffhandle; struct callout_handle tohandle; struct devstat device_stats; + eventhandler_tag clonetag; + dev_t masterdev; device_t dev; fdu_t fdu; }; @@ -497,7 +499,7 @@ fdc_alloc_resources(struct fdc_data *fdc) { device_t dev; - int ispnp, ispcmcia; + int ispnp, ispcmcia, nports; dev = fdc-fdc_dev; ispnp = (fdc-flags FDC_ISPNP) != 0; @@ -516,12 +518,13 @@ * uses the register with offset 6 for pseudo-DMA, and the * one with offset 7 as control register. */ + nports = ispcmcia ? 8 : (ispnp ? 1 : 6); fdc-res_ioport = bus_alloc_resource(dev, SYS_RES_IOPORT, fdc-rid_ioport, 0ul, ~0ul, -ispcmcia ? 8 : (ispnp ? 1 : 6), -RF_ACTIVE); +nports, RF_ACTIVE); if (fdc-res_ioport == 0) { - device_printf(dev, cannot reserve I/O port range\n); + device_printf(dev, cannot reserve I/O port range (%d ports)\n, + nports); return ENXIO; } fdc-portt = rman_get_bustag(fdc-res_ioport); @@ -569,7 +572,7 @@ 0ul, ~0ul, 1, RF_ACTIVE); if (fdc-res_ctl == 0) { device_printf(dev, - cannot reserve control I/O port range\n); + cannot reserve control I/O port range (control port)\n); return ENXIO; } fdc-ctlt = rman_get_bustag(fdc-res_ctl); @@ -760,8 +763,10 @@ return (error); } +#endif /* NCARD 0 */ + static int -fdc_pccard_detach(device_t dev) +fdc_detach(device_t dev) { struct fdc_data *fdc; int error; @@ -772,6 +777,12 @@ if ((error = bus_generic_detach(dev))) return (error); + /* reset controller, turn motor off */ + fdout_wr(fdc, 0); + + if ((fdc-flags FDC_NODMA) == 0) + isa_dma_release(fdc-dmachan); + if ((fdc-flags FDC_ATTACHED) == 0) { device_printf(dev, already unloaded\n); return (0); @@ -785,8 +796,6 @@ return (0); } -#endif /* NCARD 0 */ - /* * Add a
su broken?
Hi, su appears to be asking for a password when invoked by root, eg: # su bin -c pwd Password: Broken, surely? -- Bob Bishop (0118) 977 4017 international code +44 118 [EMAIL PROTECTED]fax (0118) 989 4254 To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
libalias, natd and punch_fw
hi, i've upgraded a system from 4.3-stable to 5.0-current (22.06.2001) and noticed that the punch_fw option of natd doesn't work anymore. i testet several active-ftp-connections and only got a response from the ftp-server 500 Invalid Port Command. natd did not punch new firewall-rules. is libalias broken or just configured different in -current? -- bernd fuerwitt To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: su broken?
Sun, Jun 24, 2001 at 19:21:20, rb (Bob Bishop) wrote about su broken?: su appears to be asking for a password when invoked by root, eg: # su bin -c pwd Password: root@iv:~##su bin -c pwd This account is currently not available. root@iv:~##su -m bin -c pwd /root Broken, surely? root@iv:~##ident /usr/bin/su /usr/bin/su: $FreeBSD: src/usr.bin/su/su.c,v 1.39 2001/05/26 09:52:36 markm Exp $ And what is of yours? /netch To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
unified pwutil library - thoughts?
Hey all, Ok, so my thinking goes a little like this: having chpass, vipw, passwd, rpc.yppasswdd et. al. using the same functions (pw_copy, pw_temp, pw_init...) and then, in order to update the database calling a function which does nothing more than execl(pwd_mkdb) and exit seems kinda silly. For a couple of my projects, having a BSD approved way of modifying the master.passwd/spwd.db would have been _very_ nice, so I have created libpwutil. This new lib could be used to (staticly) link all the afore mentioned command line utils, and create a more central way to manage password changes, as well as creating a reasonably nice C interface to changing passwords. If I am way off my rocker, please let me know. I've also created a _new_ pw_mkdb function which does NOT use execl or system. If this sounds like something that people are interested in, I would be happy to work up some doccumentation, and submit it for inclusion/port-dom as well as patches to chpass and crew if people think it is a good idea. Just _looking_ at the Makefiles for things like chpass brought on the urge to make a change... ;) Also, future support for things like NIS+/LDAP could (possibly) be more easily developed. visigoth P.S. the lib will be BSD licenced, NOT GPL'd ;) -- Damieon Stark, CCSE Unix/Network Security Engineer plug currently seeking employment /plug __ Damieon Stark | Microsoft: Where do you want to go today? e: [EMAIL PROTECTED] | Linux: Where do you want to go tommorow? p: 612.382.6945 | FreeBSD: Are you guys comming or what? pgp: 0xBE5D0C57 | http://www.freebsd.org - The power to serve! -- PGP signature
Re: Problems with md5 -p
Sun, Jun 24, 2001 at 09:25:22, stephen (Stephen Montgomery-Smith) wrote about Problems with md5 -p: I reproduce it stably on my -current. The second checksum is constant and it is MD5 checksum of an empty stream: root@iv:/usr/HEAD/src/sbin/md5##md5 /dev/null d41d8cd98f00b204e9800998ecf8427e A fix: --- md5.c.orig Mon Jun 4 00:38:02 2001 +++ md5.c Sun Jun 24 19:37:13 2001 @@ -65,7 +65,7 @@ switch (ch) { case 'p': MDFilter(1); - break; + exit(0); case 'q': qflag = 1; break; This avoids determination of other options, but this does not conflict directly with man page. Moreover such exit(0) should be applied not only with -p, but also with -x, -t and -s: all these options should not gather any input files. Patch is trivial. Suppose I have a file xxx. If I type md5 -p xxx it should return the contents of the file followed by its md5 number: Some junk in the file 334911f8bcde69fe8edac561197e876f But now I get two numbers: Some junk in the file 334911f8bcde69fe8edac561197e876f d41d8cd98f00b204e9800998ecf8427e This is using FreeBSD stable of June 16. (Maybe this has been fixed more recently - please tell me of it has. It is a bit tricky for me to update sources because I use CTM which has been out recently - probably for just this very reason. But if I know the problem has been fixed then I will go through the effort of using cvsup.) /netch To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Problems with md5 -p
OK, I'm going to make this into a PR so that it gets fixed soon. (The problem in stable appeared between May 19 and June 16.) Valentin Nechayev wrote: Sun, Jun 24, 2001 at 09:25:22, stephen (Stephen Montgomery-Smith) wrote about Problems with md5 -p: I reproduce it stably on my -current. The second checksum is constant and it is MD5 checksum of an empty stream: root@iv:/usr/HEAD/src/sbin/md5##md5 /dev/null d41d8cd98f00b204e9800998ecf8427e A fix: --- md5.c.orig Mon Jun 4 00:38:02 2001 +++ md5.c Sun Jun 24 19:37:13 2001 @@ -65,7 +65,7 @@ switch (ch) { case 'p': MDFilter(1); - break; + exit(0); case 'q': qflag = 1; break; This avoids determination of other options, but this does not conflict directly with man page. Moreover such exit(0) should be applied not only with -p, but also with -x, -t and -s: all these options should not gather any input files. Patch is trivial. Suppose I have a file xxx. If I type md5 -p xxx it should return the contents of the file followed by its md5 number: Some junk in the file 334911f8bcde69fe8edac561197e876f But now I get two numbers: Some junk in the file 334911f8bcde69fe8edac561197e876f d41d8cd98f00b204e9800998ecf8427e This is using FreeBSD stable of June 16. (Maybe this has been fixed more recently - please tell me of it has. It is a bit tricky for me to update sources because I use CTM which has been out recently - probably for just this very reason. But if I know the problem has been fixed then I will go through the effort of using cvsup.) /netch -- Stephen Montgomery-Smith [EMAIL PROTECTED] http://www.math.missouri.edu/~stephen To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Problems with md5 -p
Sun, Jun 24, 2001 at 13:16:07, stephen (Stephen Montgomery-Smith) wrote about Re: Problems with md5 -p: OK, I'm going to make this into a PR so that it gets fixed soon. (The problem in stable appeared between May 19 and June 16.) Yes, it appeared with commits: ru 2001/05/22 03:33:44 PDT Modified files: sbin/md5 Makefile md5.c Removed files: sbin/md5 global.h Log: Fix argument processing. Make this compile with WARNS=2. PR: bin/27524 MFC after:3 days Revision ChangesPath 1.5 +3 -1 src/sbin/md5/Makefile 1.22 +46 -52src/sbin/md5/md5.c ru 2001/05/26 05:08:35 PDT Modified files:(Branch: RELENG_4) sbin/md5 md5.c Removed files: (Branch: RELENG_4) sbin/md5 global.h Log: MFC: fix argument processing. Revision ChangesPath 1.20.2.2 +46 -52src/sbin/md5/md5.c Before them the case when MDFilter(0) should be called, checked separately (argc==1). After them it is not checked, fix argument processing is somehow wrong. IMO these commits should be reverted. Valentin Nechayev wrote: Sun, Jun 24, 2001 at 09:25:22, stephen (Stephen Montgomery-Smith) wrote about Problems with md5 -p: I reproduce it stably on my -current. The second checksum is constant and it is MD5 checksum of an empty stream: root@iv:/usr/HEAD/src/sbin/md5##md5 /dev/null d41d8cd98f00b204e9800998ecf8427e A fix: --- md5.c.orig Mon Jun 4 00:38:02 2001 +++ md5.c Sun Jun 24 19:37:13 2001 @@ -65,7 +65,7 @@ switch (ch) { case 'p': MDFilter(1); - break; + exit(0); case 'q': qflag = 1; break; This avoids determination of other options, but this does not conflict directly with man page. Moreover such exit(0) should be applied not only with -p, but also with -x, -t and -s: all these options should not gather any input files. Patch is trivial. Suppose I have a file xxx. If I type md5 -p xxx it should return the contents of the file followed by its md5 number: Some junk in the file 334911f8bcde69fe8edac561197e876f But now I get two numbers: Some junk in the file 334911f8bcde69fe8edac561197e876f d41d8cd98f00b204e9800998ecf8427e This is using FreeBSD stable of June 16. (Maybe this has been fixed more recently - please tell me of it has. It is a bit tricky for me to update sources because I use CTM which has been out recently - probably for just this very reason. But if I know the problem has been fixed then I will go through the effort of using cvsup.) /netch To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message