Consulta

2011-08-30 Thread Marcela
Chombas - Gorras - Remeras y Bolsos

Directo de fabrica al mejor precio del mercado

No pierda dinero comprando a revendedores compre directo de fabrica !!!

Estampamos o bordamos la imagen o el logo que usted necesite

Solo venta por mayor minimo 100 unidades

Tenemos la mejor calidad- Todos los talles y colores

[IMAGE][IMAGE][IMAGE]

Nuestros clientes son: Partidos politicos - Agencias de turismo - Grandes
Empresas - Gobieno - Obras Sociales - Ong - Pymes

Para poder cotizar su consulta enviar el archivo de su imagen en formato
JPG

Solo enviar consultas a: consult...@mail.ru (enviar numero de telefono)

Telefono: 11-4225-4962  de 10 a 18 hs - Stock permanente - Envios a todo
el pais



Re: pflog shows 0.0.0.0.0 > 0.0.0.0.0

2011-08-30 Thread Alexander Bluhm
On Tue, Aug 30, 2011 at 01:18:12PM +0200, Henning Brauer wrote:
> --- pf.c  30 Aug 2011 00:40:47 -  1.771
> +++ pf.c  30 Aug 2011 11:14:19 -
> @@ -2762,9 +2762,6 @@ pf_test_rule(struct pf_rule **rm, struct
>   u_int16_tvirtual_type, virtual_id;
>   u_int8_t icmptype = 0, icmpcode = 0;
>  
> - PF_ACPY(&pd->nsaddr, pd->src, pd->af);
> - PF_ACPY(&pd->ndaddr, pd->dst, pd->af);
> -
>   bzero(&act, sizeof(act));
>   act.prio[0] = act.prio[1] = PF_PRIO_NOTSET;
>   bzero(sns, sizeof(sns));

When pf_test_rule() is called for fragments that have not been
reassembled, the address copy is not done anymore.

I think pf_setup_pdesc() should not call pf_test_rule() at all and
just fill the pd struct.  But that is more work so I would suggest
to copy the PF_ACPY() to the handle fragments that aren't reassembled
by normalization.

bluhm



Re: ksh history corruption

2011-08-30 Thread Marco Peereboom
On Tue, Aug 30, 2011 at 11:11:46AM -0500, Marco Peereboom wrote:
> I have had enough of corrupt ksh history so I had a look at the code to
> try to fix it.  The magical code was very magical so I basically deleted
> most of it and made ksh history into a flat text file.  It handles
> multiple ksh instances writing to the same text file with locks just
> like the current ksh does.  I haven't noticed any differences in
> behavior running this.
> 
> Code is much simpler and it shaves ~4k of the binary too.

Better diff attached.

Index: alloc.c
===
RCS file: /cvs/src/bin/ksh/alloc.c,v
retrieving revision 1.8
diff -u -p -r1.8 alloc.c
--- alloc.c 21 Jul 2008 17:30:08 -  1.8
+++ alloc.c 30 Aug 2011 18:05:47 -
@@ -62,7 +62,7 @@ alloc(size_t size, Area *ap)
 {
struct link *l;
 
-   l = malloc(sizeof(struct link) + size);
+   l = calloc(1, sizeof(struct link) + size);
if (l == NULL)
internal_errorf(1, "unable to allocate memory");
l->next = ap->freelist;
Index: history.c
===
RCS file: /cvs/src/bin/ksh/history.c,v
retrieving revision 1.39
diff -u -p -r1.39 history.c
--- history.c   19 May 2010 17:36:08 -  1.39
+++ history.c   30 Aug 2011 18:45:14 -
@@ -11,8 +11,7 @@
  * a)  the original in-memory history  mechanism
  * b)  a more complicated mechanism done by  p...@hillside.co.uk
  * that more closely follows the real ksh way of doing
- * things. You need to have the mmap system call for this
- * to work on your system
+ * things.
  */
 
 #include "sh.h"
@@ -22,19 +21,10 @@
 # include 
 # include 
 
-/*
- * variables for handling the data file
- */
-static int histfd;
-static int hsize;
-
-static int hist_count_lines(unsigned char *, int);
-static int hist_shrink(unsigned char *, int);
-static unsigned char *hist_skip_back(unsigned char *,int *,int);
-static void histload(Source *, unsigned char *, int);
-static void histinsert(Source *, int, unsigned char *);
-static void writehistfile(int, char *);
-static int sprinkle(int);
+static voidwritehistfile(FILE *);
+static FILE*history_open(int *);
+static int history_load(FILE *, Source *);
+static voidhistory_close(FILE *);
 
 static int hist_execute(char *);
 static int hist_replace(char **, const char *, const char *, int);
@@ -45,8 +35,8 @@ static void   histbackup(void);
 static char   **current;   /* current position in history[] */
 static char*hname; /* current name of history file */
 static int hstarted;   /* set after hist_init() called */
-static Source  *hist_source;
-
+static Source  *hist_source;
+static struct stat last_sb;
 
 int
 c_fc(char **wp)
@@ -529,15 +519,10 @@ sethistfile(const char *name)
/* if the name is the same as the name we have */
if (hname && strcmp(hname, name) == 0)
return;
-
/*
 * its a new name - possibly
 */
-   if (histfd) {
-   /* yes the file is open */
-   (void) close(histfd);
-   histfd = 0;
-   hsize = 0;
+   if (hname) {
afree(hname, APERM);
hname = NULL;
/* let's reset the history */
@@ -577,18 +562,29 @@ init_histvec(void)
 void
 histsave(int lno, const char *cmd, int dowrite)
 {
-   char **hp;
-   char *c, *cp;
+   char**hp;
+   char*c, *cp;
+   int changed;
+   FILE*f = NULL;
+
+   if (dowrite) {
+   f = history_open(&changed);
+   if (f == NULL)
+   return;
+   if (changed) {
+   /* reset history */
+   histptr = history - 1;
+   hist_source->line = 0;
+   history_load(f, hist_source);
+   }
+
+   }
 
c = str_save(cmd, APERM);
if ((cp = strchr(c, '\n')) != NULL)
*cp = '\0';
 
-   if (histfd && dowrite)
-   writehistfile(lno, c);
-
hp = histptr;
-
if (++hp >= history + histsize) { /* remove oldest command */
afree((void*)*history, APERM);
for (hp = history; hp < history + histsize - 1; hp++)
@@ -596,371 +592,124 @@ histsave(int lno, const char *cmd, int d
}
*hp = c;
histptr = hp;
-}
-
-/*
- * Write history data to a file nominated by HISTFILE
- * if HISTFILE is unset then history still happens, but
- * the data is not written to a file
- * All copies of ksh looking at the file will maintain the
- * same history. This is ksh behaviour.
- *
- * This stuff uses mmap()
- * if your system ain't got it - then you'll have to undef HISTORYFILE
- */
 
-/*
- * Open a histor

Re: UPDATE: usr.bin/less

2011-08-30 Thread Brynet
On Tue, Aug 30, 2011 at 01:45:04PM -0400, Brynet wrote:
> The version of less is in base is under a BSD equivalent license, the one 
> you're updating us to is.. GPLv3.
> 
> -Bryan.

Ah, nevermind. It's actually under a dual BSD-alike and GPLv3 license. Hmm.

-Bryan.



Re: UPDATE: usr.bin/less

2011-08-30 Thread Brynet
The version of less is in base is under a BSD equivalent license, the one 
you're updating us to is.. GPLv3.

-Bryan.



UPDATE: usr.bin/less

2011-08-30 Thread Alexandr Shadchin
Hi,

http://koba.devio.us/distfiles/less.diff

This update less to the latest release 444.
Tested on i386 and amd64.

Change build system ( or leave old ? ):
* no configure, used prepared define.h
* no Makefile.bsd-wrapper, used less/Makefile and lesskey/Makefile

Please test on other arch.

Comments ? OK ? 

-- 
Alexandr Shadchin



ksh history corruption

2011-08-30 Thread Marco Peereboom
I have had enough of corrupt ksh history so I had a look at the code to
try to fix it.  The magical code was very magical so I basically deleted
most of it and made ksh history into a flat text file.  It handles
multiple ksh instances writing to the same text file with locks just
like the current ksh does.  I haven't noticed any differences in
behavior running this.

Code is much simpler and it shaves ~4k of the binary too.

Index: history.c
===
RCS file: /cvs/src/bin/ksh/history.c,v
retrieving revision 1.39
diff -u -p -r1.39 history.c
--- history.c   19 May 2010 17:36:08 -  1.39
+++ history.c   30 Aug 2011 15:25:23 -
@@ -11,8 +11,7 @@
  * a)  the original in-memory history  mechanism
  * b)  a more complicated mechanism done by  p...@hillside.co.uk
  * that more closely follows the real ksh way of doing
- * things. You need to have the mmap system call for this
- * to work on your system
+ * things.
  */
 
 #include "sh.h"
@@ -22,19 +21,10 @@
 # include 
 # include 
 
-/*
- * variables for handling the data file
- */
-static int histfd;
-static int hsize;
-
-static int hist_count_lines(unsigned char *, int);
-static int hist_shrink(unsigned char *, int);
-static unsigned char *hist_skip_back(unsigned char *,int *,int);
-static void histload(Source *, unsigned char *, int);
-static void histinsert(Source *, int, unsigned char *);
-static void writehistfile(int, char *);
-static int sprinkle(int);
+static voidwritehistfile(FILE *);
+static FILE*history_open(int *);
+static int history_load(FILE *, Source *);
+static voidhistory_close(FILE *);
 
 static int hist_execute(char *);
 static int hist_replace(char **, const char *, const char *, int);
@@ -45,8 +35,8 @@ static void   histbackup(void);
 static char   **current;   /* current position in history[] */
 static char*hname; /* current name of history file */
 static int hstarted;   /* set after hist_init() called */
-static Source  *hist_source;
-
+static Source  *hist_source;
+static struct stat last_sb;
 
 int
 c_fc(char **wp)
@@ -529,15 +519,10 @@ sethistfile(const char *name)
/* if the name is the same as the name we have */
if (hname && strcmp(hname, name) == 0)
return;
-
/*
 * its a new name - possibly
 */
-   if (histfd) {
-   /* yes the file is open */
-   (void) close(histfd);
-   histfd = 0;
-   hsize = 0;
+   if (hname) {
afree(hname, APERM);
hname = NULL;
/* let's reset the history */
@@ -577,18 +562,29 @@ init_histvec(void)
 void
 histsave(int lno, const char *cmd, int dowrite)
 {
-   char **hp;
-   char *c, *cp;
+   char**hp;
+   char*c, *cp;
+   int changed;
+   FILE*f = NULL;
+
+   if (dowrite) {
+   f = history_open(&changed);
+   if (f == NULL)
+   return;
+   if (changed) {
+   /* reset history */
+   histptr = history - 1;
+   hist_source->line = 0;
+   history_load(f, hist_source);
+   }
+
+   }
 
c = str_save(cmd, APERM);
if ((cp = strchr(c, '\n')) != NULL)
*cp = '\0';
 
-   if (histfd && dowrite)
-   writehistfile(lno, c);
-
hp = histptr;
-
if (++hp >= history + histsize) { /* remove oldest command */
afree((void*)*history, APERM);
for (hp = history; hp < history + histsize - 1; hp++)
@@ -596,371 +592,123 @@ histsave(int lno, const char *cmd, int d
}
*hp = c;
histptr = hp;
-}
-
-/*
- * Write history data to a file nominated by HISTFILE
- * if HISTFILE is unset then history still happens, but
- * the data is not written to a file
- * All copies of ksh looking at the file will maintain the
- * same history. This is ksh behaviour.
- *
- * This stuff uses mmap()
- * if your system ain't got it - then you'll have to undef HISTORYFILE
- */
 
-/*
- * Open a history file
- * Format is:
- * Bytes 1, 2: HMAGIC - just to check that we are dealing with
- * the correct object
- * Then follows a number of stored commands
- * Each command is
- * 
- */
-#define HMAGIC10xab
-#define HMAGIC20xcd
-#define COMMAND0xff
+   if (dowrite) {
+   writehistfile(f);
+   history_close(f);
+   }
+}
 
-void
-hist_init(Source *s)
+static FILE *
+history_open(int *changed)
 {
-   unsigned char   *base;
-   int lines;
-   int fd;
-
-   if (Flag(FTALKING) == 0)
-   return;
+   int

Re: quotacheck(8) and duid

2011-08-30 Thread Kenneth R Westerback
On Tue, Aug 30, 2011 at 01:25:14AM +0200, Rogier Krieger wrote:
> ...at present do not seem to go together nicely:
> 
> # tail -n 1 /etc/fstab
> 73123067c3dc34d4.a /data ffs rw,userquota,groupquota 1 1
> 
> # /sbin/quotacheck /data
> quotacheck: 73123067c3dc34d4.a: No such file or directory
> 
> 
> Would the attached diff be acceptable? It appears to solve my issue,
> working with both the /dev/sd0a and duid forms. Note that (for
> unchanged fstab and patch applied), using quotacheck with the
> then-current physical device (sd0a) complains.
> # /sbin/quotacheck /dev/sd0a
> /dev/sd0a not found in /etc/fstab
> 
> Hardly surprising, since it's indeed not in fstab; I suppose it's
> overkill to add logic for this. In case the diff gets mangled in
> transit, alternatively try: http://pastebin.com/VRN8wZX6
> 
> Regards,
> 
> Rogier

I think that the logic to recognize '/dev/sd0a' as being in fstab
whether literally or as a DUID would be required. This would appear
to require moving the opendev() to above the getfsent() loop and
adding a check for "argnum = oneof(realpath, argv, argc)". And of
course moving the associated close().

Not using quotacheck I can't quickly determine if that works.

Checking for other consumers of getfsent() vs device name on
command line would be interesting.

 Ken

> 
> 
> Index: Makefile
> ===
> RCS file: /cvs/src/sbin/quotacheck/Makefile,v
> retrieving revision 1.6
> diff -u -r1.6 Makefile
> --- Makefile21 Sep 1997 11:37:57 -  1.6
> +++ Makefile29 Aug 2011 23:20:47 -
> @@ -6,4 +6,7 @@
>  MAN=   quotacheck.8
>  .PATH: ${.CURDIR}/../fsck
> 
> +LDADD+=-lutil
> +DPADD+=${LIBUTIL}
> +
>  .include 
> Index: quotacheck.c
> ===
> RCS file: /cvs/src/sbin/quotacheck/quotacheck.c,v
> retrieving revision 1.25
> diff -u -r1.25 quotacheck.c
> --- quotacheck.c27 Oct 2009 23:59:34 -  1.25
> +++ quotacheck.c29 Aug 2011 23:20:47 -
> @@ -50,6 +50,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -263,13 +264,14 @@
> ino_t ino, inosused;
> pid_t pid;
> char *cp;
> +   char *realdev;
> 
> switch (pid = fork()) {
> case -1:/* error */
> warn("fork");
> return 1;
> case 0: /* child */
> -   if ((fi = open(fsname, O_RDONLY, 0)) < 0)
> +   if ((fi = opendev(fsname, O_RDONLY, 0, &realdev)) < 0)
> err(1, "%s", fsname);
> sync();
> dev_bsize = 1;



Re: mg word wrapping tweak

2011-08-30 Thread Mark Lumsden
---
| Date: Wed, 29 Jun 2011 23:12:16 -0700
| From: Matthew Dempsky
| To: tech@openbsd.org
| Subject: mg word wrapping tweak

> 
> It drives me crazy that when I have a complete parenthetical sentence,
> mg keeps insisting on taking away my double space after the close
> parenthesis.
> 
> Diff below tweaks the logic from "allow double space after /[.?!]/" to
> "allow double space after /[.?!]\)?/".
> 

ok from me. Behaviour comes in line with emacs-23.

However, I amended the comment. I didn't understand yours (at first ;)
 
-lum

Index: paragraph.c
===
RCS file: /cvs/src/usr.bin/mg/paragraph.c,v
retrieving revision 1.19
diff -u -p -r1.19 paragraph.c
--- paragraph.c 4 Jun 2009 02:23:37 -   1.19
+++ paragraph.c 30 Aug 2011 04:57:29 -
@@ -190,11 +190,15 @@ fillpara(int f, int n)
/*
 * if at end of line or at doublespace and previous
 * character was one of '.','?','!' doublespace here.
+* behave the same way if a ')' is preceded by a
+* [.?!] and followed by a doublespace.
 */
if ((eolflag ||
curwp->w_doto == llength(curwp->w_dotp) ||
(c = lgetc(curwp->w_dotp, curwp->w_doto)) == ' '
-   || c == '\t') && ISEOSP(wbuf[wordlen - 1]) &&
+   || c == '\t') && (ISEOSP(wbuf[wordlen - 1]) ||
+   (wbuf[wordlen - 1] == ')' && 
+   ISEOSP(wbuf[wordlen - 2]))) &&
wordlen < MAXWORD - 1)
wbuf[wordlen++] = ' ';



Re: Missing aoe(4) man page

2011-08-30 Thread Jason McIntyre
On Tue, Aug 30, 2011 at 01:57:48PM +0300, Alexey Suslikov wrote:
> Hello tech@.
> 
> bioctl does support for AOE since revision 1.101, softraid does
> AOE config since revision 1.23. both are in 5.0.
> 
> Moreover, http://www.openbsd.org/plus45.html mentions aoe(4),
> http://en.wikipedia.org/wiki/ATA_over_Ethernet mentions "native"
> support for AOE since OpenBSD 4.5-current.
> 
> if_aoe.c is in sys/conf/files, but not in sys/conf/GENERIC.
> 
> Is there any reason why aoe(4) man page is missing? Is AOE
> in usable state?
> 
> Alexey

hi alexey. you can check the cvs logs for the files which exist and/or
contact the authors of these files.

jmc



Re: pflog shows 0.0.0.0.0 > 0.0.0.0.0

2011-08-30 Thread Henning Brauer
* Matt Van Mater  [2011-08-22 23:14]:
> I am looking into why my
> pflog has these ambiguous entries that show source and destination as all
> zeros e.g. 0.0.0.0.0 > 0.0.0.0.0.

this fixes it. nsaddr/port and ndaddr/port were set up in pf_test_rule
and thus not set up if we passed a packet statefully.

I have left the icmp dance in pf_test_rule... some of that should pbly
also move to pf_setup_pdesc.

tests, oks?

Index: pf.c
===
RCS file: /cvs/src/sys/net/pf.c,v
retrieving revision 1.771
diff -u -p -r1.771 pf.c
--- pf.c30 Aug 2011 00:40:47 -  1.771
+++ pf.c30 Aug 2011 11:14:19 -
@@ -2762,9 +2762,6 @@ pf_test_rule(struct pf_rule **rm, struct
u_int16_tvirtual_type, virtual_id;
u_int8_t icmptype = 0, icmpcode = 0;
 
-   PF_ACPY(&pd->nsaddr, pd->src, pd->af);
-   PF_ACPY(&pd->ndaddr, pd->dst, pd->af);
-
bzero(&act, sizeof(act));
act.prio[0] = act.prio[1] = PF_PRIO_NOTSET;
bzero(sns, sizeof(sns));
@@ -2782,14 +2779,6 @@ pf_test_rule(struct pf_rule **rm, struct
}
 
switch (pd->virtual_proto) {
-   case IPPROTO_TCP:
-   pd->nsport = th->th_sport;
-   pd->ndport = th->th_dport;
-   break;
-   case IPPROTO_UDP:
-   pd->nsport = pd->hdr.udp->uh_sport;
-   pd->ndport = pd->hdr.udp->uh_dport;
-   break;
 #ifdef INET
case IPPROTO_ICMP:
icmptype = pd->hdr.icmp->icmp_type;
@@ -2820,9 +2809,6 @@ pf_test_rule(struct pf_rule **rm, struct
}
break;
 #endif /* INET6 */
-   default:
-   pd->nsport = pd->ndport = 0;
-   break;
}
 
pd->osport = pd->nsport;
@@ -5849,6 +5835,14 @@ pf_setup_pdesc(sa_family_t af, int dir, 
}
 #endif /* INET6 */
}
+
+   PF_ACPY(&pd->nsaddr, pd->src, pd->af);
+   PF_ACPY(&pd->ndaddr, pd->dst, pd->af);
+   if (pd->sport)
+   pd->nsport = *pd->sport;
+   if (pd->dport)
+   pd->ndport = *pd->dport;
+
return (0);
 }
 


-- 
Henning Brauer, h...@bsws.de, henn...@openbsd.org
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting



Missing aoe(4) man page

2011-08-30 Thread Alexey Suslikov
Hello tech@.

bioctl does support for AOE since revision 1.101, softraid does
AOE config since revision 1.23. both are in 5.0.

Moreover, http://www.openbsd.org/plus45.html mentions aoe(4),
http://en.wikipedia.org/wiki/ATA_over_Ethernet mentions "native"
support for AOE since OpenBSD 4.5-current.

if_aoe.c is in sys/conf/files, but not in sys/conf/GENERIC.

Is there any reason why aoe(4) man page is missing? Is AOE
in usable state?

Alexey