From: Daniel S. <moo...@av...> - 2008-05-10 03:01:34
|
Here is an interesting one that has been broken since AOLserver 4.0. In hosts.allow, you can use either a full or partial hostname, or ipaddr/netmask. Not all work. 192.168.0.10/255.255.255.255 <- Gives error "Invalid address or hostname "192.168.0.10". should be ipaddr/netmask or hostname" 192.168.0.10/255.255.255.0 <- This fixes the above -BUT- it allows in the whole class C, which may not really be what is wanted. bob.someserver.com <- this works (though haven't looked deep enough to see if it does sanity check on forward + reverse lookup to guarantee it is really the right host) The error is caused by inet_addr() returning INADDR_NONE on 255.255.255.255 . Using inet_aton() resolves this issue. A patch to nsperm.c at around line #739 follows: *slash = '\0'; if (inet_aton(net, &ip) == 0 || inet_aton(slash+1, &mask) == 0) { Tcl_AppendResult(interp, "invalid address or hostname \"", net, "\". " "should be ipaddr/netmask or hostname", NULL); goto fail; } Daniel -- | --------------------------------------------------------------- | Daniel P. Stasinski | http://www.saidsimple.com | moo...@av... | http://www.disabilities-r-us.com | XMMP: moo...@av... | http://www.avenues.org | Google Talk: mooooooo | http://www.scriptkitties.com |
From: Vlad S. <vl...@cr...> - 2008-05-10 15:36:21
|
patched, submitted. Thanks Daniel Stasinski wrote: > Here is an interesting one that has been broken since AOLserver 4.0. > > In hosts.allow, you can use either a full or partial hostname, or > ipaddr/netmask. Not all work. > > 192.168.0.10/255.255.255.255 <- Gives error "Invalid address or > hostname "192.168.0.10". should be ipaddr/netmask or hostname" > 192.168.0.10/255.255.255.0 <- This fixes the above -BUT- it allows in > the whole class C, which may not really be what is wanted. > bob.someserver.com <- this works (though haven't looked deep enough > to see if it does sanity check on forward + reverse lookup to > guarantee it is really the right host) > > The error is caused by inet_addr() returning INADDR_NONE on > 255.255.255.255 . Using inet_aton() resolves this issue. A patch to > nsperm.c at around line #739 follows: > > *slash = '\0'; > if (inet_aton(net, &ip) == 0 || inet_aton(slash+1, &mask) == 0) { > Tcl_AppendResult(interp, "invalid address or hostname \"", > net, "\". " "should be ipaddr/netmask > or hostname", NULL); > goto fail; > } > > Daniel > -- Vlad Seryakov vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Daniel S. <moo...@av...> - 2008-05-10 19:33:35
|
On Sat, May 10, 2008 at 8:32 AM, Vlad Seryakov <vl...@cr...> wrote: > patched, submitted. Thanks I just committed it to aolserver cvs also. Daniel -- | --------------------------------------------------------------- | Daniel P. Stasinski | http://www.saidsimple.com | moo...@av... | http://www.disabilities-r-us.com | XMMP: moo...@av... | http://www.avenues.org | Google Talk: mooooooo | http://www.scriptkitties.com |
From: Vlad S. <vl...@cr...> - 2008-05-10 19:37:27
|
Do you need write access to naviserver CVS? Daniel Stasinski wrote: > On Sat, May 10, 2008 at 8:32 AM, Vlad Seryakov <vl...@cr...> wrote: >> patched, submitted. Thanks > > I just committed it to aolserver cvs also. > > Daniel > -- Vlad Seryakov vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Daniel S. <moo...@av...> - 2008-05-10 19:43:42
|
On Sat, May 10, 2008 at 12:33 PM, Vlad Seryakov <vl...@cr...> wrote: > Do you need write access to naviserver CVS? That would be great. Thank you. Daniel -- | --------------------------------------------------------------- | Daniel P. Stasinski | http://www.saidsimple.com | moo...@av... | http://www.disabilities-r-us.com | XMMP: moo...@av... | http://www.avenues.org | Google Talk: mooooooo | http://www.scriptkitties.com |
From: Vlad S. <vl...@cr...> - 2008-05-10 20:56:19
|
Added Daniel Stasinski wrote: > On Sat, May 10, 2008 at 12:33 PM, Vlad Seryakov <vl...@cr...> wrote: >> Do you need write access to naviserver CVS? > > That would be great. Thank you. > > Daniel > -- Vlad Seryakov vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Stephen D. <sd...@gm...> - 2008-05-11 15:26:26
|
On Sat, May 10, 2008 at 8:43 PM, Daniel Stasinski <moo...@av...> wrote: > On Sat, May 10, 2008 at 12:33 PM, Vlad Seryakov <vl...@cr...> wrote: >> Do you need write access to naviserver CVS? > > That would be great. Thank you. > > Daniel Don't forget to describe your change in the ChangeLog *before* you commit, and commit everything together (you forgot to edit the changelog for AOLserver). Also, you need to fix your editor so that it doesn't automatically change whitespace willy-nilly. Your 3 line change turned into a gigantic unreadable mess in the commit email. (when you figure out how to fix it, remind Vlad 'cos he seems to have forgotten :-) The reason is with multiple people editing the source we all need to be on the same page, and one way to do that is to read the commit notifications, and another is to look at the ChangeLog. According to the AOLserver ChangeLog the last person to edit the source was Nathan 1 year ago: http://aolserver.cvs.sourceforge.net/aolserver/aolserver/ChangeLog?view=markup Which is a lie. What's changed? Who knows... |
From: Vlad S. <vl...@cr...> - 2008-05-11 15:56:46
|
> > Also, you need to fix your editor so that it doesn't automatically > change whitespace willy-nilly. Your 3 line change turned into a > gigantic unreadable mess in the commit email. > > (when you figure out how to fix it, remind Vlad 'cos he seems to have > forgotten :-) Yes, i think i have. What are our editor predefines? i think i tried but my editor keeps removing tabs automaticlaly and this is not what we want i guess. - Use whitespaces, not tabs - Tab is 8 charactares, or 4 ? what else? |
From: Stephen D. <sd...@gm...> - 2008-05-11 17:43:40
|
On Sun, May 11, 2008 at 4:53 PM, Vlad Seryakov <vl...@cr...> wrote: >> >> Also, you need to fix your editor so that it doesn't automatically >> change whitespace willy-nilly. Your 3 line change turned into a >> gigantic unreadable mess in the commit email. >> >> (when you figure out how to fix it, remind Vlad 'cos he seems to have >> forgotten :-) > > Yes, i think i have. > What are our editor predefines? i think i tried but my editor keeps > removing tabs automaticlaly and this is not what we want i guess. Exactly. It's the automatic on open/save bit that's the problem. > - Use whitespaces, not tabs > - Tab is 8 charactares, or 4 ? 4 > what else? You're using Vim? Maybe someone knows how to fix this. Anyone? |
From: Vlad S. <vl...@cr...> - 2008-05-11 17:46:47
|
> > You're using Vim? Maybe someone knows how to fix this. Anyone? No, i do not use Vim and i just fixed that. Tested using cvs diff, works fine. |
From: Stephen D. <sd...@gm...> - 2008-05-11 18:13:57
|
On Sun, May 11, 2008 at 6:43 PM, Vlad Seryakov <vl...@cr...> wrote: >> >> You're using Vim? Maybe someone knows how to fix this. Anyone? > > No, i do not use Vim and i just fixed that. Tested using cvs diff, works > fine. Groovy. So how did you fix it? |
From: Vlad S. <vl...@cr...> - 2008-05-11 18:48:39
|
I use fte (or efte) editor, very old but flexible and i use it 10 years already, it has an option to trim lines on save. i disabled it and now it does not change untouched lines. Stephen Deasey wrote: > On Sun, May 11, 2008 at 6:43 PM, Vlad Seryakov <vl...@cr...> wrote: >>> You're using Vim? Maybe someone knows how to fix this. Anyone? >> No, i do not use Vim and i just fixed that. Tested using cvs diff, works >> fine. > > > Groovy. So how did you fix it? > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > -- Vlad Seryakov vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Daniel S. <moo...@av...> - 2008-05-11 16:05:25
|
> Also, you need to fix your editor so that it doesn't automatically > change whitespace willy-nilly. Your 3 line change turned into a > gigantic unreadable mess in the commit email. I'm not sure if this is to me or Vlad. I did the commit on aolserver cvs only and the white space was unchanged. My code editor is set to do no space/tab/eol translation. I do notice that at least in the aolserver code, there is inconsistent use of tabs and spaces. Some lines use spaces and others use tabs to indent. Though it looks funky, I left them as they were. Guilty as charged in the ChangeLog though. Thank you for the reminder. Daniel -- | --------------------------------------------------------------- | Daniel P. Stasinski | http://www.saidsimple.com | moo...@av... | http://www.disabilities-r-us.com | XMMP: moo...@av... | http://www.avenues.org | Google Talk: mooooooo | http://www.scriptkitties.com |
From: Stephen D. <sd...@gm...> - 2008-05-11 18:09:59
|
On Sun, May 11, 2008 at 5:05 PM, Daniel Stasinski <moo...@av...> wrote: > > I did the commit on aolserver cvs only and the white space was unchanged. Your editor changed it behind your back. :-( Vim? Anyway, here's what the commit message looks like: *** nsperm.c 8 Aug 2005 11:30:15 -0000 1.10 --- nsperm.c 10 May 2008 19:31:32 -0000 1.11 *************** *** 12,16 **** * The Original Code is AOLserver Code and related documentation * distributed by AOL. ! * * The Initial Developer of the Original Code is America Online, * Inc. Portions created by AOL are Copyright (C) 1999 America Online, --- 12,16 ---- * The Original Code is AOLserver Code and related documentation * distributed by AOL. ! * * The Initial Developer of the Original Code is America Online, * Inc. Portions created by AOL are Copyright (C) 1999 America Online, *************** *** 28,32 **** */ ! /* * nsperm -- * --- 28,32 ---- */ ! /* * nsperm -- * *************** *** 111,115 **** static Tcl_HashTable serversTable; ! /* *---------------------------------------------------------------------- --- 111,115 ---- static Tcl_HashTable serversTable; ! /* *---------------------------------------------------------------------- *************** There's about 10 screens of this... > I do notice that at least in the > aolserver code, there is inconsistent use of tabs and spaces. Some > lines use spaces and others use tabs to indent. Though it looks > funky, I left them as they were. Yeah, we like spaces not tabs, and we try to leave it as it is when making small changes so that the commits are readable. Before making a large change to a file that hasn't been cleaned up it's often a good idea to make a separate commit with just the whitespace changes -- then everyone can just ignore it. So I guess that's something like: :%retab in Vim, and M-x untabify in emacs. |
From: Daniel S. <moo...@av...> - 2008-05-11 19:30:45
|
On Sun, May 11, 2008 at 11:09 AM, Stephen Deasey <sd...@gm...> wrote: > Your editor changed it behind your back. :-( Ah, you're right. aolserver code has embedded form feed characters (0x0c) at the head of every function. It's not something I recall noticing before. Daniel -- | --------------------------------------------------------------- | Daniel P. Stasinski | http://www.saidsimple.com | moo...@av... | http://www.disabilities-r-us.com | XMMP: moo...@av... | http://www.avenues.org | Google Talk: mooooooo | http://www.scriptkitties.com |