[patch] user/6104: newsyslog count off by one
Hello, Please review the proposed patch to fix the newsyslog problem. Thanks, David $ diff -u newsyslog.c newsyslog.c.bak --- newsyslog.c.bak Thu Oct 22 21:18:12 2009 +++ newsyslog.c Thu Oct 22 22:00:09 2009 @@ -756,6 +756,9 @@ char file1[MAXPATHLEN], file2[MAXPATHLEN], *suffix; int numdays = ent->numlogs; + /* We start counting at 0 so reduce for correct maximum */ + numdays--; + /* Remove oldest log (may not exist) */ (void)snprintf(file1, sizeof(file1), "%s.%d", oldlog, numdays); (void)snprintf(file2, sizeof(file2), "%s.%d%s", oldlog, numdays,
Accessoires de mode soldé jusqu'a -70%
Ce message contient des images, si elles ne s'affichent pas correctement, cliquez ici [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] [IMAGE] Nos clientes timoignent : Martine P. (de Neuilly sur Marne, 93). Posti le 21 dicembre 2009 : "Merci pour la rapiditi de l'expidition de ma commande que j'ai bien regue et qui correspond tout-`-fait ` ce que je m'attendais.Vu le prix,c'est un cadeau facile et si pratique et iligant : plus aucune femme ne saurait s'en passer! Jepense qu'` ce prix, je vous en commanderai d'autres." A quoi sert un accroche Sac ? Mode d'emplois et albums photos ` votre disposition ! Mesdames, vous emmenez votre sac ` main partout avec vous. Oy le poser ? Oy lâaccrocher ? Oy le mettre ` lâabri ? LâAccroche Sac ripond ` toutes vos questions !!! Petit, joli, personnalisable, pratique, il vous deviendra trhs vite indispensable. Lâaccroche sac est un accessoire de mode, et grbce ` lui, votre sac ` main sera aussi dâune propreti irriprochable ! Une itude sur les sacs ` main fiminins a eu des risultats dipassant l'imagination : ` ctti du rouge ` lhvres, les pires bactiries se diveloppent... Le sac ` main est l'accessoire incontournable de la femme moderne. Elle l'emmhne partout, il ne doit jamais quitter sa partenaire et doit impirativement refliter l'itat d'esprit de celle qui le porte. En gros c'est, dis-moi quel sac ` main tu as et je te dirais qui tu es. Seulement voil`, au-dessous des apparences, l'outil fashion par excellence pourrait s'avirer jtre un ignoble compagnon, bien plus trash qu'une Amy Winehouse en goguette. Des laitues en sachet aux jacuzzis, la channe amiricaine KUTV s'est fait une spicialiti de la traque aux bactiries auxquelles les consommateurs s'exposent sans le savoir. Le public, ividemment intiressi par ces enqujtes, en redemande, c'est pourquoi aprhs un intense brainstorming d'au moins 2 minutes les journalistes ont pensi ` itudier... les sacs ` mains. Au printemps 2006, Shauna Lake, reporter de KUTV a commandi ` Nelson Labs des kits de tests et fait des prilhvements sur une cinquantaine de sacs ` mains de personnes volontaires, croisies dans les rues de Salt Lake City. Amy Karen, microbiologiste au Nelson Labs a analysi les les prises. Le reportage qui suivit fut accablant : c'est indiniable, les sacs ` mains sont de viritables bombes remplies de bactiries. Or, bien des femmes posant leurs sacs sur la table de la cuisine, une transmission par contact des bactiries jusqu'aux aliments serait possible lors de leur priparation. Conclusion sans appel, un sac ` main peut rendre indirectement sa propriitaire ou sa famille trhs, trhs malade. Fort de ses risultats, les scientifiques du Nelson Labs conseillent de disinfecter rigulihrement les sacs ` mains et, surtout, de ne pas les poser sur les surfaces oy nous ne poserions pas nos chaussures. Diffusie le 21 mai 2006, l'enqujte inidite de cette tilivision locale a fait le tour du monde via la toile. Kathy Wilets, productrice de KUTV, s'en amuse : "Nous rialisons que l'histoire circule... (...) Je pense que la raison principale de l'intirjt du public pour cette histoire vient de ce que la plupart des femmes transportent un sac ` main, et de ce qu'il est courant de les poser au sol, puis sur les tables, bureaux et comptoirs de cuisine. L'inorme quantiti de germes trouvis et leur dangerositi est certainement ce qui a le plus marqui les gens." Mais pourquoi le sac ` main est-il plus dangereux que le clavier, la poignie de porte des toilettes ou encore notre cher tiliphone portable ? "Chez une personne avec une bonne hygihne, le sac ` main est giniralement l'accessoire le plus contamini." explique Beau Rollins, de Nelson Labs. "Typiquement, les tiliphones contiennent pluttt des germes issus de la peau comme les staphylocoques ou les coccidies. Les portes des toilettes sont igalement riches en bactiries parce qu'elles ne sont pas nettoyies..." Câest leurs matihres qui rendent les sacs ` mains si sensibles aux bactiries. Les germes vivent plus longtemps sur un sac sâil est en tissu que sâil est en vinyle ou en cuir. Par ailleurs, les sacs ` mains ont ces risultats car ils se retrouvent dans de nombreux lieux et environnements." Source : Article paru sur le net dans plusieurs sites, basi sur un reportage TV amiricain. Conformiment aux lois en vigueur, vous avez la possibiliti de demander d'jtre retiri de nos prospects et de ne plus recevoir nos offres, pour demander, cliquez ici.
Re: if_loop
On Fri, Jan 8, 2010 at 9:15 PM, Claudio Jeker wrote: > > On Fri, Jan 08, 2010 at 01:06:03AM -0300, Gleydson Soares wrote: > >> i guess that if ifp might be bpf attached in loop_clone_create() it should be detached case destroyed. > >> Index: if_loop.c > >> === > >> RCS file: /cvs/src/sys/net/if_loop.c,v > >> retrieving revision 1.44 > >> diff -N -u if_loop.c > >> --- if_loop.c 7 May 2008 12:58:54 - 1.44 > >> +++ if_loop.c 8 Jan 2010 03:34:17 - > >> @@ -221,6 +221,9 @@ > >> if (ifp == lo0ifp) > >> return (EPERM); > >> > >> +#if NBPFILTER > 0 > >> + bpfdetach(ifp); > >> +#endif > >> if_detach(ifp); > >> > >> free(ifp, M_DEVBUF); > >> > > > > bpfdetach() is called in if_detach(). So there is no need for this diff. > > > > -- > > :wq Claudio sure. my eyes slipped in if.c
Re: [patch] patch:util.c does free memory after strdup(3)
Stuart Henderson wrote: > On 2010/01/08 13:33, Owain Ainsworth wrote: >> Please note that none of your patches apply because of spaces in the >> whitespace instead of tabs (I applied them manually). Either your mail >> client is mangling the diffs, or you're copy/pasting the diffs into the >> mail client. In future could you please try and stop this happening, it >> makes dealing with the patches a lot harder? > > I can recommend xclip (in packages) if you're pasting into X; > e.g. "cvs di | xclip -i" then paste away. and, since -i is the default, you can even save yourself those three extra keystrokes each time! OMG! :)
Re: if_loop
On Fri, Jan 08, 2010 at 01:06:03AM -0300, Gleydson Soares wrote: > i guess that if ifp might be bpf attached in loop_clone_create() it should be > detached case destroyed. > Index: if_loop.c > === > RCS file: /cvs/src/sys/net/if_loop.c,v > retrieving revision 1.44 > diff -N -u if_loop.c > --- if_loop.c 7 May 2008 12:58:54 - 1.44 > +++ if_loop.c 8 Jan 2010 03:34:17 - > @@ -221,6 +221,9 @@ > if (ifp == lo0ifp) > return (EPERM); > > +#if NBPFILTER > 0 > + bpfdetach(ifp); > +#endif > if_detach(ifp); > > free(ifp, M_DEVBUF); > bpfdetach() is called in if_detach(). So there is no need for this diff. -- :wq Claudio
Re: [patch] lib/libc/yp/yp_all.c mem leak
On Fri, Jan 8, 2010 at 2:22 PM, patrick keshishian wrote: > On Fri, Jan 08, 2010 at 03:47:48PM +0300, Igor Zinovik wrote: >> Hello, t...@. >> >> A bit tricky code in yp_all.c `val' is not freed. It might be >> allocated but might be not freed >> when `key' allocation failed. >> >> Index: lib/libc/yp/yp_all.c >> === >> RCS file: /OpenBSD/src/lib/libc/yp/yp_all.c,v >> retrieving revision 1.9 >> diff -u -r1.9 yp_all.c >> --- lib/libc/yp/yp_all.c5 Aug 2005 13:02:16 - 1.9 >> +++ lib/libc/yp/yp_all.c8 Jan 2010 12:37:25 - >> @@ -78,8 +78,11 @@ >> } >> xdr_free(xdr_ypresp_all, (char *)&out); >> >> - if (key == NULL || val == NULL) >> + if (key == NULL || val == NULL) { >> + if (val != NULL) >> + free(val); > > you can simply call free(val). Yes. Best fix is probably to remove the else branch on the val malloc. Then check either for NULL, free both, and return. I think that's much clearer.
Re: [patch] lib/libc/yp/yp_all.c mem leak
On Fri, Jan 08, 2010 at 03:47:48PM +0300, Igor Zinovik wrote: > Hello, t...@. > > A bit tricky code in yp_all.c `val' is not freed. It might be > allocated but might be not freed > when `key' allocation failed. > > Index: lib/libc/yp/yp_all.c > === > RCS file: /OpenBSD/src/lib/libc/yp/yp_all.c,v > retrieving revision 1.9 > diff -u -r1.9 yp_all.c > --- lib/libc/yp/yp_all.c5 Aug 2005 13:02:16 - 1.9 > +++ lib/libc/yp/yp_all.c8 Jan 2010 12:37:25 - > @@ -78,8 +78,11 @@ > } > xdr_free(xdr_ypresp_all, (char *)&out); > > - if (key == NULL || val == NULL) > + if (key == NULL || val == NULL) { > + if (val != NULL) > + free(val); you can simply call free(val). --patrick > return FALSE; > + } > > r = (*ypresp_allfn)(status, key, > out.ypresp_all_u.val.key.keydat_len, val,
Re: [patch] patch:util.c does free memory after strdup(3)
2010/1/8 Stuart Henderson : > On 2010/01/08 13:33, Owain Ainsworth wrote: >> Please note that none of your patches apply because of spaces in the >> whitespace instead of tabs (I applied them manually). Either your mail >> client is mangling the diffs, or you're copy/pasting the diffs into the >> mail client. In future could you please try and stop this happening, it >> makes dealing with the patches a lot harder? > > I can recommend xclip (in packages) if you're pasting into X; > e.g. "cvs di | xclip -i" then paste away. No that not my case. My openbsd works in vm, i'm connecting to it via ssh and sending diffs via gmail web interface. Ok, i'l just setup sendmail and mail and will use them to send diffs.
Re: [patch] patch:util.c does free memory after strdup(3)
On 2010/01/08 13:33, Owain Ainsworth wrote: > Please note that none of your patches apply because of spaces in the > whitespace instead of tabs (I applied them manually). Either your mail > client is mangling the diffs, or you're copy/pasting the diffs into the > mail client. In future could you please try and stop this happening, it > makes dealing with the patches a lot harder? I can recommend xclip (in packages) if you're pasting into X; e.g. "cvs di | xclip -i" then paste away.
Bar Magazine Tip of the Week
Private Label Bar Mix Helps Small-Mid Sized Chains Improve Quality and Consistency Signature drinks and Private Labeling are powerful marketing tools to increase Quality and Consistency - 2 ingredients which help to drive sales and boost profits. Many small to medium-sized restaurants feel it is not possible or cost effective to private label based on the sales volume (they think) is required. This is simply no longer true. Click here to view the full article that discusses how private labeling can help your restaurant flourish by improving on the 2 key areas. Sincerely, Robert W. (Bob) McNamara President Columbine Specialty Products Inc. 4880 East 41st Avenue Denver, CO 80216 This is a marketing message. We respect your right to be removed from this marketing campaign. Removal from this email distribution list is automatically enforced by our email delivery system. Please click here to be removed. If this hyperlink comes through in text format or is not visible please hit reply to this email and type "Remove" in the subject line. If you have any problems with this removal link please contact Cindy at 800-757-3715 and we will handle your request immediately.
Re: [patch] patch:util.c does free memory after strdup(3)
On Fri, Jan 08, 2010 at 12:45:11AM +0300, Igor Zinovik wrote: > Hello, t...@. > > tmpbuf is allocated via strdup(3) but it is leaved unfreed when we > leave makedirs() function. I have commited a few of these (this one, the libc/hash one and the pwd_mkdb one). I shall look at the others shortly. Some nice catches in there. Please note that none of your patches apply because of spaces in the whitespace instead of tabs (I applied them manually). Either your mail client is mangling the diffs, or you're copy/pasting the diffs into the mail client. In future could you please try and stop this happening, it makes dealing with the patches a lot harder? -0- -- Grabel's Law: 2 is not equal to 3 -- not even for large values of 2.
[patch] lib/libc/yp/yp_all.c mem leak
Hello, t...@. A bit tricky code in yp_all.c `val' is not freed. It might be allocated but might be not freed when `key' allocation failed. Index: lib/libc/yp/yp_all.c === RCS file: /OpenBSD/src/lib/libc/yp/yp_all.c,v retrieving revision 1.9 diff -u -r1.9 yp_all.c --- lib/libc/yp/yp_all.c5 Aug 2005 13:02:16 - 1.9 +++ lib/libc/yp/yp_all.c8 Jan 2010 12:37:25 - @@ -78,8 +78,11 @@ } xdr_free(xdr_ypresp_all, (char *)&out); - if (key == NULL || val == NULL) + if (key == NULL || val == NULL) { + if (val != NULL) + free(val); return FALSE; + } r = (*ypresp_allfn)(status, key, out.ypresp_all_u.val.key.keydat_len, val,
[patch] dhcpd/confpars.c tiny memory leak
Hello, t...@. dhcpd forgets to free(3) host. Index: usr.sbin/dhcpd/confpars.c === RCS file: /OpenBSD/src/usr.sbin/dhcpd/confpars.c,v retrieving revision 1.18 diff -u -r1.18 confpars.c --- usr.sbin/dhcpd/confpars.c 2 Jan 2010 04:21:16 - 1.18 +++ usr.sbin/dhcpd/confpars.c 8 Jan 2010 12:24:34 - @@ -522,8 +522,10 @@ host->name = name; host->group = clone_group(group, "parse_host_declaration"); - if (!parse_lbrace(cfile)) + if (!parse_lbrace(cfile)) { + free(host); return; + } do { token = peek_token(&val, cfile);
Re: Automatic package mirror discovery implementation for pkg_add(1) tool
2010/1/8 Bob Beck : >> Apart from this, this is a really tough problem, because of infrastructure >> issues. Basically, our mirrors are not that reliable, and the closest >> one often won't have the packages you need... which is a reason why it's >> mostly some user settings... > > True - although we could do a very similar stunt to what we do with ftplist > now in the installer - including remembering your most recent choice from your > IP address, so it just figured out where you liked to get your packages from. > And what I mean by that Is that I would be willing to put together a similar trick for this on ftp.openbsd.org as I did for the installer - if someone was willing to integrate it into the pkg_add tools.
Re: Automatic package mirror discovery implementation for pkg_add(1) tool
> Apart from this, this is a really tough problem, because of infrastructure > issues. Basically, our mirrors are not that reliable, and the closest > one often won't have the packages you need... which is a reason why it's > mostly some user settings... True - although we could do a very similar stunt to what we do with ftplist now in the installer - including remembering your most recent choice from your IP address, so it just figured out where you liked to get your packages from.
[patch] /usr/src/lib/libc/hash/helper.c
Hello, t...@. HASHFileChunk leaks file descriptor `fd'. Index: lib/libc/hash/helper.c === RCS file: /OpenBSD/src/lib/libc/hash/helper.c,v retrieving revision 1.8 diff -u -r1.8 helper.c --- lib/libc/hash/helper.c 8 Aug 2005 08:05:35 - 1.8 +++ lib/libc/hash/helper.c 8 Jan 2010 11:49:26 - @@ -62,8 +62,10 @@ } len = sb.st_size; } - if (off > 0 && lseek(fd, off, SEEK_SET) < 0) + if (off > 0 && lseek(fd, off, SEEK_SET) < 0) { + close(fd); return (NULL); + } while ((nr = read(fd, buffer, MIN(sizeof(buffer), len))) > 0) { HASHUpdate(&ctx, buffer, (size_t)nr);