Re: goodbye to some isa devices
On 03/27/13 21:14, Creamy wrote: On Wed, Mar 27, 2013 at 08:05:47PM +, Miod Vallat wrote: Or are you just trolling for the sake of it? I didn't expect that from you, frankly. Other people have been rude to me off-list, but I thought you were above that. You make some valid points, but I also agree you seem a tad trollish at times, and your choice of name does not improve the feeling. Maybe you are, maybe you aren't (or believe you aren't), but that's how I, and as it seems, others, feel. I really can't remember anyone feeling offended by miod before. Maybe that's a hint. I dunno. Acting butthurt on this list, justified or not, has never helped anyone though. /Alexander
Re: goodbye to some isa devices
Nick Holland nick at holland-consulting.net writes: There is a lot of ISA stuff I'd object to removing from the kernel; none of this is it. I'm entirely ok with this stuff going... How about this one? ie0 at isa? port 0x360 iomem 0xd irq 7 # StarLAN and 3C507 Looking at sys/dev/isa/if_ie.c shows different pieces of code glued together and it is relative big (~2000 LOC).
Re: /usr.bin/colldef and collation tables
On Tue, Mar 26, 2013 at 07:31:01AM -0500, Vladimir Támara Patiño wrote: I didnt' receive answer if I should send both patches as one. Since I corrected a realloc in collate.c, here I'm sending everything (including man pages of wcscoll, wcsxfrm and corrections for strcoll and strxfmr). I don't have much time right now to read this in detail and try it out. But I've skimmed it once more and wanted to give you some feedback. The style of the lex/yacc stuff in colldef looks good to me now. It seems you have an outdated version of colldef.h in this diff, e.g. the STR_LEN define is back. I doubt this diff compiles as-is. It seems there is some compat stuff in collate.c, at least that what this constant seems to be used for: +#define COLLATE_VERSION1.1\n Is this really needed? Can we remove this, or is your diff adding colldef files which use the 1.1 format? wcscoll.c has indentation issues (not very important but it would be good to make this code KNF, see the style(9) man page). There are several C++ comments in this patch (// foo), please change them to /* foo */ or remove them if not strictly necessary. As discussed before, comments like this one aren't necessary: /** In OpenBSD using wchar_t, while the original from FreeBSD was char * */ I'd remove any references to xlocale from this diff. It really doesn't matter right now, this diff should focus on collations support only. For instance, I'd rename the struct xlocale_collate to something like struct __collate.
Re: goodbye to some isa devices
On 28.03.2013, at 13:17, Daniel Bolgheroni dan...@bolgh.eng.br wrote: On Thu, Mar 28, 2013 at 05:46:30AM +, Miod Vallat wrote: You can't say in substance it's a pity OpenBSD doesn't support the VAX 11/780 anymore in one mail, you guys really ought to ditch floppy installation media in another, and expect people not to question your logic or your motives. Agreed. I read all this thread and couldn't figure it out what this guy really wants. To be quite frank, your statement is even more ambiguous and could be easily misinterpreted as 'trollish' in nature. Here, asking questions is considered a waste of many people's time, yet some always feel obligated to point out just how much of their precious time is actually being wasted. Redundancy and impoliteness ensue. Ask any psychologist what makes humans special and they will tell you it is the ability to ask questions in order to enrich their complex existence. Deal with it. And keep your ISA support, because nobody is going to take it away from you by asking 'stupid' questions. I really don't get it why it invokes so many hard feelings. And kudos to Nick for being the calmest and most helpful person in this discussion. Keep it up.
Re: goodbye to some isa devices
please everyone, move this to misc@ if you want to continue, or just drop the thread.
md5: returns 0 when a file does not exist
Hello, I noticed that md5(1) returns 0 when you target a file that does not exist: = $ md5 foobar md5: cannot open foobar: No such file or directory $ echo $? 0 = This seems wrong according to the man page, and I have looked at the FreeBSD and Linux equivalent tool which returns 1 in this case. I have attempted to write a patch that changes this behaviour. My limited testing has been successful at least, see diff below. Regards, Patrik Lundin Index: md5.c === RCS file: /cvs/src/bin/md5/md5.c,v retrieving revision 1.54 diff -u -r1.54 md5.c --- md5.c 4 Dec 2012 02:38:51 - 1.54 +++ md5.c 28 Mar 2013 14:09:43 - @@ -194,7 +194,7 @@ TAILQ_HEAD(hash_list, hash_function); void digest_end(const struct hash_function *, void *, char *, size_t, int); -void digest_file(const char *, struct hash_list *, int); +int digest_file(const char *, struct hash_list *, int); int digest_filelist(const char *, struct hash_function *); void digest_print(const struct hash_function *, const char *, const char *); void digest_printstr(const struct hash_function *, const char *, const char *); @@ -386,10 +386,10 @@ error += digest_filelist(*argv++, TAILQ_FIRST(hl)); } else if (pflag || argc == 0) - digest_file(-, hl, pflag); + error = digest_file(-, hl, pflag); else while (argc--) - digest_file(*argv++, hl, 0); + error += digest_file(*argv++, hl, 0); return(error ? EXIT_FAILURE : EXIT_SUCCESS); } @@ -476,7 +476,7 @@ } } -void +int digest_file(const char *file, struct hash_list *hl, int echo) { struct hash_function *hf; @@ -489,7 +489,7 @@ fp = stdin; else if ((fp = fopen(file, r)) == NULL) { warn(cannot open %s, file); - return; + return(1); } if (echo) @@ -510,7 +510,7 @@ warn(%s: read error, file); if (fp != stdin) fclose(fp); - return; + return(1); } if (fp != stdin) fclose(fp); @@ -523,6 +523,7 @@ else digest_print(hf, file, digest); } + return(0); } /*
Re: pppd-invoked scripts to run as root or not?
On 2013/03/23 19:37, patrick keshishian wrote: On Sat, Mar 23, 2013 at 5:15 PM, Creamy cre...@nocrater.com wrote: From the pppd man page: 1163:.Sh SCRIPTS 1164-.Nm 1165-invokes scripts at various stages in its processing which can be 1166-used to perform site-specific ancillary processing. 1167-These scripts are usually shell scripts, but could be executable code files 1168-instead. 1169-.Nm 1170-does not wait for the scripts to finish. 1171-The scripts are executed as root (with the real and effective user ID set to 0), No, they are not. Which is wrong, the man page, or the behavior of pppd? some history: http://marc.info/?l=openbsd-techm=123494734721801 ... from 2009. yikes :) --patrick I think this diff is in the right direction, but that we should check permissions on the scripts to make sure they aren't group/world writable. Of course it doesn't stop people shooting themselves in the foot by running a writable script from another, but stops accidental problems. Any OKs ? Index: main.c === RCS file: /cvs/src/usr.sbin/pppd/main.c,v retrieving revision 1.49 diff -u -p -r1.49 main.c --- main.c 30 Apr 2011 18:49:38 - 1.49 +++ main.c 28 Mar 2013 15:25:56 - @@ -1173,9 +1173,17 @@ run_program(prog, args, must_exist) char **args; int must_exist; { +struct stat sbuf; pid_t pid; uid_t uid; -gid_t gid; + +if (stat(prog, sbuf) 0) { + syslog(LOG_ERR, cannot stat program file %s: %m, prog); + return -1; +} else if ((sbuf.st_mode (S_IWGRP | S_IWOTH)) != 0) { + syslog(LOG_ERR, %s: group/world writable, prog); + return -1; +} pid = fork(); if (pid == -1) { @@ -1190,10 +1198,9 @@ run_program(prog, args, must_exist) (void) umask (S_IRWXG|S_IRWXO); (void) chdir (/); /* no current directory. */ - /* revoke privs */ + /* Execute scripts as root, to allow routing table changes etc. */ uid = getuid(); - gid = getgid(); - if (setresgid(gid, gid, gid) == -1 || setresuid(uid, uid, uid) == -1) { + if (setreuid(0, 0) == -1) { syslog(LOG_ERR, revoke privileges: %s, strerror(errno)); _exit(1); }
EuroBSDcon 2013 Call for Proposals
EuroBSDcon 2013: September 26-29 in Malta = EuroBSDcon is the European technical conference for users and developers of BSD-based systems. The conference will take place on Thursday, September 26 through Sunday, September 29 at the Hilton http://goo.gl/maps/hnACd in St. Julian's, Malta (tutorials on Thursday and Friday, talks on Saturday and Sunday). Call for Proposals -- The EuroBSDcon program committee is inviting BSD developers and users to submit innovative and original talk proposals not previously presented at other European conferences. Topics of interest to the conference include, but are not limited to applications, architecture, implementation, performance and security of BSD-based operating systems, as well as topics concerning the economic or organizational aspects of BSD use. Presentations are expected to be 45 minutes and are to be delivered in English. Call for Tutorial Proposals --- The EuroBSDcon program committee is also inviting qualified practitioners in their field to submit proposals for half or full day tutorials on topics relevant to development, implementation and use of BSD-based systems. Half-day tutorials are expected to be 2.5 to 3 hours and full-day tutorials 5 to 6 hours. Tutorials are held in English. Submissions --- Proposals should be sent by email to submission at eurobsdcon.org. They should contain a short and concise text description in about 100 words The submission should also include a short CV of the speaker and an estimate of the expected travel expenses. Please submit each proposal as a separate email. Important dates --- The EuroBSDcon program committee is accepting talk and tutorial proposals until Monday, May 25 2013. Other important dates will be announced soon the conference website http://2013.EuroBSDcon.org/.