Re: requests for perl XS code

2010-10-18 Thread Philip Guenther
On Sun, Oct 17, 2010 at 5:55 PM, Damien Miller d...@mindrot.org wrote:
 On Sun, 17 Oct 2010, Marc Espie wrote:
...
 What I'm talking about is mostly wrapping around recvmsg/sendmsg
 and CMSG_DATA pack/unpack type routines.

 We had talked about putting fdpassing functions into libutil at one
 stage. IMO it would be better to go ahead with this and then wrap
 the result.

Right, 'cause if we had a design for that API, the perl API could be
modeled after it.  Right now, I'm pondering the generic recvmsg() API,
which requires the caller to provide space for control data up front,
and thinking that something like:

 ($addr, $msg_flags, $control_data) = recvmsg($fh, $buffer,
$length, $flags, $control_len);

is the most basic level, but that's scary for a few reasons:
1) how do you, *in perl*, come up with the right value for $control_len?
2) so you parse $control_data with perl versions of the CMSG_* macros; can you
   really map the numeric fds to perl filehandles *and have them close
correctly*?
3) unwary users that didn't handle SCM_RIGHTS would leak fds...though that's
   really a bug in the UNIX API itself.

(Hmm, what does recvmsg() do with control data if MSG_PEEK is set?
Can you get fds twice by peeking at them?  What happens if two fds are
sent but the receiver only provides room for one?  Does the second
remain queued, does it get closed, or (hopefully not) does it get
lost?)


Philip Guenther



groff going away at some point...

2010-10-18 Thread Marc Espie
... and the ports tree is actually ready to switch.
Any port that requires groff just need to set
USE_GROFF=Yes
to
- have a build depends on the groff port
- have pkg_create format pages using the groff port behind the scenes.

Note that this is transparent revision-wise, there's absolutely no need to
bump anything, since that's a build-depends, and register-plist is already
aware of the equivalence between manN/foo.N and catN/foo.0

So, it's just a question of a massive commit to tag all ports that have
manpages with USE_GROFF, do a build and check that everything is fine.

Then we can slowly switch everything that's happy with it back to mandoc.



move isakmpd to the openssl version of cast

2010-10-18 Thread Mike Belopuhov
isakmpd is the only user of the cast cipher from the libc,
so i'd like to move it to the openssl version and remove
cast cipher from the libc.

diff is tested against patched and unpatched versions in
both initiator and responder modes.

OK?

Index: crypto.c
===
RCS file: /home/cvs/src/sbin/isakmpd/crypto.c,v
retrieving revision 1.30
diff -u -p -r1.30 crypto.c
--- crypto.c15 Oct 2010 10:18:42 -  1.30
+++ crypto.c18 Oct 2010 08:37:58 -
@@ -204,38 +204,25 @@ blf_decrypt(struct keystate *ks, u_int8_
 enum cryptoerr
 cast_init(struct keystate *ks, u_int8_t *key, u_int16_t len)
 {
-   cast_setkey(ks-ks_cast, key, len);
+   CAST_set_key(ks-ks_cast, len, key);
return EOKAY;
 }
 
 void
 cast1_encrypt(struct keystate *ks, u_int8_t *data, u_int16_t len)
 {
-   u_int16_t   i, blocksize = ks-xf-blocksize;
+   u_int16_t   blocksize = ks-xf-blocksize;
u_int8_t   *iv = ks-liv;
 
memcpy(iv, ks-riv, blocksize);
 
-   for (i = 0; i  len; data += blocksize, i += blocksize) {
-   XOR64(data, iv);
-   cast_encrypt(ks-ks_cast, data, data);
-   SET64(iv, data);
-   }
+   CAST_cbc_encrypt(data, data, len, ks-ks_cast, iv, 1);
 }
 
 void
 cast1_decrypt(struct keystate *ks, u_int8_t *data, u_int16_t len)
 {
-   u_int16_t   i, blocksize = ks-xf-blocksize;
-
-   data += len - blocksize;
-   for (i = len - blocksize; i = blocksize; data -= blocksize,
-   i -= blocksize) {
-   cast_decrypt(ks-ks_cast, data, data);
-   XOR64(data, data - blocksize);
-   }
-   cast_decrypt(ks-ks_cast, data, data);
-   XOR64(data, ks-riv);
+   CAST_cbc_encrypt(data, data, len, ks-ks_cast, ks-riv, 0);
 }
 
 enum cryptoerr
Index: crypto.h
===
RCS file: /home/cvs/src/sbin/isakmpd/crypto.h,v
retrieving revision 1.19
diff -u -p -r1.19 crypto.h
--- crypto.h15 Oct 2010 10:18:42 -  1.19
+++ crypto.h18 Oct 2010 08:37:22 -
@@ -34,7 +34,7 @@
 
 #include openssl/des.h
 #include blf.h
-#include cast.h
+#include openssl/cast.h
 
 #include openssl/aes.h
 
@@ -82,7 +82,7 @@ struct keystate {
union {
DES_key_schedule desks[3];
blf_ctx blfks;
-   cast_keycastks;
+   CAST_KEYcastks;
AES_KEY aesks[2];
}   keydata;
 };



Re: usb xfer timeout issue

2010-10-18 Thread Kevin Chadwick
On Sun, 17 Oct 2010 23:01:01 +
Jacob Meuser jake...@sdf.lonestar.org wrote:

 unless someone sees a problem, or has a better solution, I think this
 should go in soon.

Xfer and bb_reset rings bells with some panics I had. If/when this goes
in and I find time I'll try all the devices I've had problems with
(different devices, different releases, I think, weird, certain usbs
always fine) and see if I can get a panic/lock-up.

Many Thanks for all the usb work



Todo para el Jardín

2010-10-18 Thread TBX Herramientas
nbsp; HidrolavadoraGamma Hobby 120  $  
 275  Bordeadoraeleacute;ctrica
 400W  $110  Corta   
cerco 550W 50 cm  $270  Cortadora   
de cesped 1000W   $390



PABLO OLIVARES en Concierto

2010-10-18 Thread Novedades Feedback
Mail para ser visto con conexiC3n, si no puede verlo, click aquC

[IMAGE]

FeedBack

[IMAGE]

FeedBack

Feedback, comunicacion en serio

[IMAGE]

[IMAGE]

bl

Agencia de Prensa y Noticias, servicio de Mailing y Publicidad
email: veron...@agenciafeedback.com.ar | website:
www.agenciafeedback.com.ar

bt

Si usted no esta interesado en recibir mas informacion proporcionada por
Feedback, Agencia de Prensa, env?enos un e-mail indicando en el asunto la
palabra Eliminar a prensafeedb...@gmail y sera dado de baja
automaticamente. Para subscribirse o por algun tercero que desee hacerlo,
tambien envienos a la misma direccion de email resaltando en el asunto la
palabra Registro. Nuevamente disculpe por las molestias que le pudimos
haber ocasionado.



Semana NIKON

2010-10-18 Thread DigitalesNet
USD2049   Nikon 
D300s Body Tipo  de caacute;mara
reacute;flex digital de objetivos 
intercambiables / Fecha presentacioacute;n julio,  
   2009  Captacioacute;n de imagen / Sensor de imagen  
   Tipo CMOS / Tamantilde;o 23.60 x 15.80 mm  Resolucioacute;n
Total 13.1 MP / Efectiva 12.3  MP Nikon L21 
USD  143,10 Nikon L22  USD  
   155 Nikon L110  USD  360,40
Nikon S203  USD  177,47 Nikon S220  USD 
185.50 Nikon S3000  USD 
196,10 Nikon S1000PJ  USD  410 Nikon
P100  USD  519



Olympus T100 - Funciones avanzadas a precio inmejorable

2010-10-18 Thread Sonika
Olympus  T100 USD 124.99 Sensor 
de imagen de 12 MP / Resolucioacute;n maacute;xima de 
3.968 x 2.976 pixeles Zoom oacute;ptico de 3x. / Zoom digital de 4x
Deteccioacute;n Rostros / Estabilizacioacute;n Digital
 de Imaacute;genes / Enfoque Automaacute;tico de seguimiento  
   / 21 modos de escena / Modo Panoraacute;mico en PC /
 Pantalla LCD de 2,4 / Graba video con audio en 640
 x 480.



Re: update pms driver

2010-10-18 Thread Nicholas Marriott
This seems is fine too.

Cheers



On Sun, Oct 17, 2010 at 05:38:32PM +0600, Alexandr Shadchin wrote:
 On Sun, Oct 17, 2010 at 06:34:23AM -0400, Kenneth R Westerback wrote:
  On Sat, Oct 16, 2010 at 09:00:43PM +0600, Alexandr Shadchin wrote:
   On Sat, Oct 16, 2010 at 03:42:10PM +0100, Nicholas Marriott wrote:
pmsinput could have a newline after the return type like the rest,
otherwise looks good for me.

   
   I agree, did not notice :)
   Fixed
   
   -- 
   Alexandr Shadchin
  
  The diff diddn't compile due to ';' in pmsprobe(). Make sure you at least
  compile diffs, lest we start trusting you and committing without compiling
  ourselves!
 
 Right now wanted to write about this error.
 I have two laptops. Second forgot to sync. I'll try to be more attentive.
 
  
  Done. Next? :-).
  
   Ken
 
 Simplified pmsprobe(), no functional change.
 
 -- 
 Alexandr Shadchin
 
 Index: pms.c
 ===
 RCS file: /cvs/src/sys/dev/pckbc/pms.c,v
 retrieving revision 1.10
 diff -u -p -r1.10 pms.c
 --- pms.c 17 Oct 2010 10:32:00 -  1.10
 +++ pms.c 17 Oct 2010 11:30:24 -
 @@ -134,21 +134,10 @@ pmsprobe(struct device *parent, void *ma
   /* reset the device */
   cmd[0] = PMS_RESET;
   res = pckbc_poll_cmd(pa-pa_tag, pa-pa_slot, cmd, 1, 2, resp, 1);
 - if (res) {
 + if (res || resp[0] != PMS_RSTDONE || resp[1] != 0) {
  #ifdef DEBUG
 - printf(pmsprobe: reset error %d\n, res);
 -#endif
 - return (0);
 - }
 - if (resp[0] != PMS_RSTDONE) {
 - printf(pmsprobe: reset response 0x%x\n, resp[0]);
 - return (0);
 - }
 -
 - /* get type number (0 = mouse) */
 - if (resp[1] != 0) {
 -#ifdef DEBUG
 - printf(pmsprobe: type 0x%x\n, resp[1]);
 + printf(pms: reset error %d (response 0x%02x, type 0x%02x)\n,
 + res, resp[0], resp[1]);
  #endif
   return (0);
   }



dhcpd autoproxy option

2010-10-18 Thread Driton Husnovic
Hi @Tech,

I want to configure dhcpd with WPAD option. I see that option-252 is 
renamed/moved as  autoproxy.
But there is no manual or reference about autoproxy.
Can anyone add any syntax or mini example to the list please?

--
Thanks.
Driton



switch man.conf(5) to mandoc(1)

2010-10-18 Thread Ingo Schwarze
As matthieu@ pointed out on tech@, man.conf(5) must be switched.
Now that groff doesn't even exist any more in base, it's high time.

Regarding base and new style ports (those now installing mandoc- or
groff-preformatted manuals), it makes no difference.

Regarding Xenocara and old style ports (those installing unformatted
manuals), it will not cope 100%, but certainly better than a program
that does not even exist any longer.

Admittedly, there are some problems in Xenocara:

  schwa...@rhea $ cd /usr/X11R6/man/
  schwa...@rhea $ mandoc -Tlint -Wfatal man*/* 2 /tmp/mandoc.probs
  schwa...@rhea $ wc /tmp/mandoc.probs   
 8974513   46585 /tmp/mandoc.probs

  schwa...@rhea $ grep -c 'no document body' /tmp/mandoc.probs
 823

These pages consist of a single line containing an .so macro.
They should probably be replaced by MLINKs.

  schwa...@rhea $ grep -c 'man tbl parser:.*bad syntax' /tmp/mandoc.probs 
 69

In these cases, mandoc bugs still prevent rendering of some tables.
So, in the whole of the source-installed Xenocara manuals,
69 tables got lost.

Besides, the following pages trigger fatal mandoc errors:

  XTestQueryExtension(3)
  Xcomposite(3)
  XpSelectInput(3)
  glint(4)
  rendition(4)

But i fear delaying the switch will not help Xenocara in any way.
  
OK?


Index: man.conf
===
RCS file: /cvs/src/etc/man.conf,v
retrieving revision 1.15
diff -u -p -r1.15 man.conf
--- man.conf9 Apr 2010 19:07:30 -   1.15
+++ man.conf18 Oct 2010 21:18:30 -
@@ -16,17 +16,15 @@ _subdir cat1 man1 cat8 man8 cat6 man6 c
 _suffix.0
 _build .0.Z/usr/bin/zcat %s
 _build .0.gz   /usr/bin/gzcat %s
-_build .[1-9n] /usr/bin/nroff -Tascii -man %s
-_build .[1-9n].Z   /usr/bin/zcat %s | /usr/bin/nroff -Tascii -man
-_build .[1-9n].gz  /usr/bin/gzcat %s | /usr/bin/nroff -Tascii -man
-_build .[1-9][a-z] /usr/bin/nroff -Tascii -man %s
-_build .[1-9][a-z].Z   /usr/bin/zcat %s | /usr/bin/nroff -Tascii -man
-_build .[1-9][a-z].gz  /usr/bin/gzcat %s | /usr/bin/nroff -Tascii -man
-_build .tbl/usr/bin/tbl %s | /usr/bin/nroff -Tascii -man
-_build .tbl.Z  /usr/bin/zcat %s | /usr/bin/tbl | 
/usr/bin/nroff -Tascii -man
-_build .tbl.gz /usr/bin/gzcat %s | /usr/bin/tbl | 
/usr/bin/nroff -Tascii -man
-_build .me /usr/bin/nroff -Tascii -me %s 2/dev/null | cat 
-s
-_build .ms /usr/bin/nroff -Tascii -ms %s 2/dev/null | cat 
-s
+_build .[1-9n] /usr/bin/mandoc %s
+_build .[1-9n].Z   /usr/bin/zcat %s | /usr/bin/mandoc
+_build .[1-9n].gz  /usr/bin/gzcat %s | /usr/bin/mandoc
+_build .[1-9][a-z] /usr/bin/mandoc %s
+_build .[1-9][a-z].Z   /usr/bin/zcat %s | /usr/bin/mandoc
+_build .[1-9][a-z].gz  /usr/bin/gzcat %s | /usr/bin/mandoc
+_build .tbl/usr/bin/mandoc %s
+_build .tbl.Z  /usr/bin/zcat %s | /usr/bin/mandoc
+_build .tbl.gz /usr/bin/gzcat %s | /usr/bin/mandoc
 
 # Sections and their directories.
 # All paths ending in '/' are the equivalent of entries specifying that



Re: update pms driver

2010-10-18 Thread Nicholas Marriott
This doesn't seem to cause any regressions for me.



On Tue, Oct 12, 2010 at 03:56:46PM -0400, Kenneth R Westerback wrote:
 On Fri, Oct 08, 2010 at 01:28:11AM +0600, Alexandr Shadchin wrote:
  On Wed, Oct 06, 2010 at 09:53:47PM -0400, Kenneth R Westerback wrote:
   
   Committed. Next? :-)
   
    Ken
  
  Removed unnecessary code, as the same thing does pms_change_state() when 
  the device enters a state of PMS_STATE_ENABLED
  
  -- 
  Alexandr Shadchin
 
 Works for me, but I'm not completely sure that the state change occurs when
 the attach is going on. If it is, then this should be ok. Any other tests?
 
  Ken
 
  
  Index: pms.c
  ===
  RCS file: /cvs/src/sys/dev/pckbc/pms.c,v
  retrieving revision 1.8
  diff -u -p -r1.8 pms.c
  --- pms.c   7 Oct 2010 01:52:25 -   1.8
  +++ pms.c   7 Oct 2010 18:46:59 -
  @@ -167,29 +167,11 @@ pmsattach(parent, self, aux)
  struct pms_softc *sc = (void *)self;
  struct pckbc_attach_args *pa = aux;
  struct wsmousedev_attach_args a;
  -   u_char cmd[1], resp[2];
  -   int res;
   
  sc-sc_kbctag = pa-pa_tag;
  sc-sc_kbcslot = pa-pa_slot;
   
  printf(\n);
  -
  -   /* Flush any garbage. */
  -   pckbc_flush(pa-pa_tag, pa-pa_slot);
  -
  -   /* reset the device */
  -   cmd[0] = PMS_RESET;
  -   res = pckbc_poll_cmd(pa-pa_tag, pa-pa_slot, cmd, 1, 2, resp, 1);
  -#ifdef DEBUG
  -   if (res || resp[0] != PMS_RSTDONE || resp[1] != 0) {
  -   printf(pmsattach: reset error\n);
  -   return;
  -   }
  -#endif
  -
  -   sc-inputstate = 0;
  -   sc-oldbuttons = 0;
   
  pckbc_set_inputhandler(sc-sc_kbctag, sc-sc_kbcslot,
 pmsinput, sc, sc-sc_dev.dv_xname);