Re: possible hardware failure ?

2004-08-22 Thread Anton Alin-Adrian
Claudiu wrote:
 I have also checked the SMART state of the driver with smartctl, it 
looks like this: [...]

Same happens with my atapi cdrom from time to time. Could be messed-up IDE 
channel.

But anyway, good time for a backup. Did you try a fsck -y..
Yours,
--
Alin-Adrian Anton
Spintech Systems
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Dell SBLive! (almost) fixed

2004-06-10 Thread Anton Alin-Adrian
Joseph Dunn wrote:
Whoops, forgot the diff. It's attached.
Joseph

--- emu10k1.c	2004-06-09 11:26:37.0 -0500
+++ emu10k1.c.dell	2004-06-09 11:29:26.0 -0500
@@ -37,6 +37,7 @@
 /*  */
 
 #define	EMU10K1_PCI_ID	0x00021102
+#define	EMU10K1_DELL_PCI_ID	0x00061102
 #define	EMU10K2_PCI_ID	0x00041102
 #define	EMU_DEFAULT_BUFSZ	4096
 #define	EMU_CHANS	4
@@ -1441,6 +1442,10 @@
 	case EMU10K1_PCI_ID:
 		s = Creative EMU10K1;
 		break;
+
+	case EMU10K1_DELL_PCI_ID:
+		s = Creative EMU10K1 (Dell);
+		break;
 /*
 	case EMU10K2_PCI_ID:
 		s = Creative EMU10K2;
@@ -1595,6 +1600,10 @@
 		s = Creative EMU10K1 Joystick;
 		device_quiet(dev);
 		break;
+	case 0x70041102:
+		s = Creative EMU10K1 Joystick (Dell);
+		device_quiet(dev);
+		break;
 	case 0x70031102:
 		s = Creative EMU10K2 Joystick;
 		device_quiet(dev);


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]
Try the drivers from www.opensound.com and see if it can get it working. If 
they can, then probably the card is also modified too.

--
Alin-Adrian Anton
Reversed Hell Networks
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


how many IP aliases

2004-05-27 Thread Anton Alin-Adrian
Hi guys.
Can anyone tell me what is the limit for how many IP aliases can be setup 
on the same ethernet card?

Is there a global limit for the total number of aliases in the OS?
To be clear: one needs 128 IPs (for irc vhosts) to be setup on one server. 
Is that impossible?

Thanks!
Yours sincerely,
--
Alin-Adrian Anton
Reversed Hell Networks
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how many IP aliases

2004-05-27 Thread Anton Alin-Adrian
Steven Hartland wrote:
Cant u use namebased vhosts? Or different ports?
Steve
Different ports? Why would be using different ports different? They (users) 
need to go out to irc with a different IP each time they connect. In order 
to do that, psybnc needs to use that specific IP when connecting outside to 
the IRC server. I don't see how different ports will change this situation.

Nambased vhosts work for web, I guess, but not for IRC.
Let one correct me if I am wrong.
Thanks for all the replies. 240 IPs is far enough.

- Original Message - 
From: Anton Alin-Adrian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 27 May 2004 14:03
Subject: how many IP aliases


Hi guys.
Can anyone tell me what is the limit for how many IP aliases can be setup 
on the same ethernet card?

Is there a global limit for the total number of aliases in the OS?
To be clear: one needs 128 IPs (for irc vhosts) to be setup on one server. 
Is that impossible?


This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 

In the event of misdirection, illegible or incomplete transmission please telephone 
(023) 8024 3137
or return the E.mail to [EMAIL PROTECTED]

Yours Sincerely,
--
Alin-Adrian Anton
Reversed Hell Networks
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how many IP aliases

2004-05-27 Thread Anton Alin-Adrian
Steven Hartland wrote:
Ah I assumed u meant irc vhost servers
Still leaves there question why would each psync require a specific IP?
If the IRC network you connection to limits on connections per IP
e.g.  QuakeNet ( which all should do ). You just need to apply
for a trust for X connections and your all sorted. Using multiple
IP's for such a use would be totally wasteful.
Our ISP's policy is that when one IP gets flooded, it gets blocked from 
internet access for a while.

That's the reason for so many IPs. Not perfect, but helps a lot.

Steve 
- Original Message - 
From: Anton Alin-Adrian [EMAIL PROTECTED]

Different ports? Why would be using different ports different? They (users) 
need to go out to irc with a different IP each time they connect. In order 
to do that, psybnc needs to use that specific IP when connecting outside to 
the IRC server. I don't see how different ports will change this situation.

Nambased vhosts work for web, I guess, but not for IRC.
Let one correct me if I am wrong.


This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 

In the event of misdirection, illegible or incomplete transmission please telephone 
(023) 8024 3137
or return the E.mail to [EMAIL PROTECTED]

Regards,
--
Alin-Adrian Anton
Reversed Hell Networks
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how many IP aliases

2004-05-27 Thread Anton Alin-Adrian
Per Engelbrecht wrote:
There is no upper limit.

ok.
  I
great. got that.
do know that 128 addresses isn't a problem - depending of course
on your setup such as ram, cpu, board and last but not least,
nic. Don't do it on a $20 nomame-nic.
It doesn't make any difference to the NIC.
Well I understand it's just a linked list with aprox 128 nodes. That should 
be OK on decent RAM and CPU.


Correct me if I'm wrong, but addresses to a interface is 'managed'
by SIOCAIFADDR and yes, that has noting to do with the nic itself.
They have nothing to do with NICs, they have to do with OS implementation.
NICs talk on ethernet level, and I don't know any NIC's designed with 
special hardware for handling IP aliases. Intel's FXPs rule, because they 
even do CRC and QoS with microchip:).

Probably his point was no-name hardware with small buffers may add to the 
latency.

Thank you all so much!
Best Wishes,
--
Alin-Adrian Anton
Reversed Hell Networks
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


fopen(file,a)

2004-05-26 Thread Anton Alin-Adrian
Hey folks.
Running FreeBSD 4.9-RELEASE
I am just wondering:
man fopen
---man---
 Upon successful completion fopen(), fdopen() and freopen() return a 
FILE pointer.  Otherwise, NULL is returned and the global variable errno is 
set to indicate the error.
---man---

However, the following snippet:
--snip--
FILE *fp_queue;
if ( (fp_queue=fopen(fqueue,a))  ==NULL);//will wait for locks
{
perror(fopen(fqueue,\a\));
//exit(EXIT_FAILURE);
}
--snip--
Has the following output:
--dump--
fopen(fqueue,a): Unknown error: 0
--dump--
	With that said, commenting out the exit() and using fputs() to write to 
the file works smoothly, data is written correctly, and no error is barked 
out. Same goes for fprintf().

	The snippet is so small, but I did learn that it's good to ask: am I doing 
something wrong, or is there something else wrong?

Any suggestion is gratefully appreciated.
Regards,
--
Alin-Adrian Anton
Reversed Hell Networks
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: fopen(file,a)

2004-05-26 Thread Anton Alin-Adrian
Yes, thank's everybody.
Unfortunately I thought I blocked this (old)mail message into the MTA's 
queue, however, it seems it passed out today, by my mistake.

Regards,
--
Alin-Adrian Anton
Reversed Hell Networks
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: simple, nay, elegant pop3 implementation?

2004-05-26 Thread Anton Alin-Adrian
Andrew Beals wrote:
Why is there no default pop3 implementation included in the FreeBSD 
distribution?  Is it for a lack of a suitably-licensed server, or does 
everyone believe APOP authentication is crackable?
Is there any for IMAP?
--
Alin-Adrian Anton
Reversed Hell Networks
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Wireless Card Issue AFTER Install

2004-04-30 Thread Anton Alin-Adrian
Craig Booth wrote:
Anton, thank you for taking time to help.  I have answered your questions
within your text at the bottom of this email as best as I know how to as a
raw BSD Unix user.
I defentaley appologise for not answering for such a long time, my 
attention was caught in the anti-spam war (and I receive thousands of those 
things).

Is it you that mailed me privately on if_atuwi.ko, or was it somebody else? 
I am sorry, I think it was somebody else (no results after a big search on 
my inbox).


-Original Message-
From: Anton Alin-Adrian [mailto:[EMAIL PROTECTED] 
Sent: Saturday, April 03, 2004 4:18 PM
To: Craig Booth
Cc: [EMAIL PROTECTED]
Subject: Re: Wireless Card Issue AFTER Install

Craig Booth wrote:

Any guru out there that has the knowledge to provide some advice to
persist the use of the Linksys card beyond the first install?  I tried this
question on the Questions mailing list, but no one could tackle it,
unfortunately.
Situation:
 
I have set up my Sony VAIO PCG-FRV27 laptop as a dual boot machine between
Win XP Pro and FreeBSD.  
 
I am using a Linksys Wireless card connecting through a Linksys router.  
 
My install successfully enabled and used the wireless card and router to
install directly from the FreeBSD ftp site (after CD boot) and completed
with no errors. 
 
Even though my rc.conf file is verified as setup with DHCP and the pccard
enabled, and even though the startup processes appear to find and enable the
card ok, I can't connect back to the ftp site to download more stuff unless
I use the CD to restart the install over the ftp site again.  It either
can't resolve the ftp site, or hangs during the attempt.
 
I have read where this can sometimes happen with dual boot machines when the
other OS doesn't properly release the card, but I have tried unplugging the
machine, removing and putting back both the card and the laptop battery
before rebooting, and it still doesn't work.  I am getting the [Null] [Null]
message after the Linksys Card Found message during startup, as my earlier
reading about the problem discussed, but nothing seems to change that,
unless I reinstall FreeBSD from the CD (which I'm obviously not going to do
everytime I want to use FreeBSD!)  
 
Two things I notice when I go to set up the media in SYSINSTALL.  The
gateway address (192.168.2.1) and the DHCP assigned address (range starting
with 192.168.2.2), both present on this same screen when booting from the
CD, are missing from the DHCP config screen that comes up just before
SYSINSTALL attempts to connect to the ftp site, though the connection
attempt still fails if I enter the info back in manually before trying to
connect.  Also, a message comes up before that which says something about
being in multiuser mode, and ask if I want to assume network settings are
already correct.  (or something like that)  This multiuser message is not
present when booting from the CD.
___

[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]

Hi, could you please provide a bit more info?

What is the model of your Linksys card?

Answer: Linksys Instant Wireless Network PC Card WPC11 V3.0

and what driver are you using for it?

Answer: Win XP:  Intersil islp2 version 2.0.10.0
  FreeBSD:  Intersil Firmware:  Primary 1.01.00, Station 1.04.02 (as
reported by FreeBSD)
Is it supported on the FreeBSD hardware list?

Answer: Yes

How do you configure your wireless driver? Using what software/scripts? 
Don't skip details please.

Answer: No software scripts, none that I initiated anyway.  The wireless
card is configured through the wi0 (Lucent WaveLAN/IEEE 802.11 wireless
adapter) choice, since that was the only wireless adapter selection
available on the SYSINSTALL menu.  Again, it worked for the initial install,
and when I try other choices, the logon scripts change it back to wi0
anyway, since that's apparently being picked up on auto-detection.  Here are
excerpts from the logon messages that may answer your questions, as well as
provide a bit more insight:
Apr 3 18:06:11 pccardd[49]:Card The Linksys Group, Inc.( Instant Wireless
Network PC Card)[ISL37300P][RevA] matched The Linksys Group, Inc.(
Instant Wireless Network PC Card)[(null)][(null)]
.
.
.
login: wi0 at port 0x240-0x27f irq11 slot 0 on pccard0
wi0: 802.11 address:00:06:25:15:f9:34
wi0: using RF:PRISM3(PCMCIA)
wi0: Intensil Firmware: Primary 1.01.00, Station 1.04.02
Apr 3 18:06:16 pccardd[49]:wi0: The Linksys Group, Inc.( Instant Wireless
Network PC Card inserted.
Apr 3 18:06:25 pccard[49]: pccardd started

Trying a non-DHCP config for testing might help. See if you can ping. Can
you ping your own IP of the wireless card, locally? 

Answer: I pinged 192.168.2.100 successfully.  However, I'm not sure how to
find out the local address of the card, as 192.168.2.100 was what DHCP
assigned, I believe.
Can you ping the broadcast IP

Re: FreeBSD's malloc problem ?

2004-04-24 Thread Anton Alin-Adrian
Nicolas Rachinsky wrote:
* Anton Alin-Adrian [EMAIL PROTECTED] [2004-04-24 21:27 +0300]:

	tmp = (char *) malloc(strlen(s)); // line 68


Hmm, you need strlen(s)+1 bytes to store the string -- don't forget
the trailing null byte.
Nicolas
And let there be light... DANG.. well it almost blinded me. I was confusing 
with char[16], which has the +1 byte for the null terminating, but the 
malloc(16) hasn't...

Probably doesn't crash on Linux because the malloced space is not adjacent.

Thanks for the candle.

Appologises to everyone.

--
Alin-Adrian Anton
Reversed Hell Networks
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD's malloc problem ?

2004-04-24 Thread Anton Alin-Adrian
Daniel Ellard wrote:

And let there be light...  DANG..  well it almost blinded me.  I was
confusing with char[16], which has the +1 byte for the null
terminating, but the malloc(16) hasn't...


No, that's still not quite it...

char[16] allocates exactly 16 characters.  Period.  There's no extra
space on the end for the terminating nul.  If you try to put a sixteen
character string into this array, the terminating nul will slop over
onto whatever follows this array in memory.
malloc(16) is essentially the same.  The difference is that there
might not be something right there to be clobbered.  malloc tends to
round up the number of bytes to something convenient.  It's easier to
manage a pool of things that are all the same size than a zillion
different sizes.  16 is pretty small -- the linux malloc might round
everything smaller than 20 bytes or 24 bytes (why 20 or 24?  That's
another story...) to 20 or 24 bytes bytes just to make its life
easier.  Therefore it's giving you four extra bytes and the nul can
clobber them without causing you to notice the bug.
-Dan

Yes. Thanks ;).

--
Alin-Adrian Anton
Reversed Hell Networks
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: wireless usb atmel driver

2004-04-03 Thread Anton Alin-Adrian
Bruce M Simpson wrote:
On Fri, Apr 02, 2004 at 04:25:08PM +0300, Anton Alin-Adrian wrote:

I am killing myself trying to compile http://www.vitsch.net/bsd/atuwi/ 
driver on 5.2.1-RELEASE.


Try the atuwi from my perforce tree.

BMS
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]

Ok, thanks, I will try.

Regards,
--
Alin-Adrian Anton
Reversed Hell Networks
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Wireless Card Issue AFTER Install

2004-04-03 Thread Anton Alin-Adrian
Craig Booth wrote:
Any guru out there that has the knowledge to provide some advice to persist
the use of the Linksys card beyond the first install?  I tried this question
on
the Questions mailing list, but no one could tackle it, unfortunately.
 
Situation:
 
I have set up my Sony VAIO PCG-FRV27 laptop as a dual boot machine between
Win XP Pro and FreeBSD.  
 
I am using a Linksys Wireless card connecting through a Linksys router.  
 
My install successfully enabled and used the wireless card and router to
install directly from the FreeBSD ftp site (after CD boot) and completed
with no errors. 
 
Even though my rc.conf file is verified as setup with DHCP and the pccard
enabled, and even though the startup processes appear to find and enable the
card ok, I can't connect back to the ftp site to download more stuff unless
I use the CD to restart the install over the ftp site again.  It either
can't resolve the ftp site, or hangs during the attempt.
 
I have read where this can sometimes happen with dual boot machines when the
other OS doesn't properly release the card, but I have tried unplugging the
machine, removing and putting back both the card and the laptop battery
before rebooting, and it still doesn't work.  I am getting the [Null] [Null]
message after the Linksys Card Found message during startup, as my earlier
reading about the problem discussed, but nothing seems to change that,
unless I reinstall FreeBSD from the CD (which I'm obviously not going to do
everytime I want to use FreeBSD!)  
 
Two things I notice when I go to set up the media in SYSINSTALL.  The
gateway address (192.168.2.1) and the DHCP assigned address (range starting
with 192.168.2.2), both present on this same screen when booting from the
CD, are missing from the DHCP config screen that comes up just before
SYSINSTALL attempts to connect to the ftp site, though the connection
attempt still fails if I enter the info back in manually before trying to
connect.  Also, a message comes up before that which says something about
being in multiuser mode, and ask if I want to assume network settings are
already correct.  (or something like that)  This multiuser message is not
present when booting from the CD.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Hi, could you please provide a bit more info?

What is the model of your Linksys card, and what driver are you using 
for it. Is it supported on the FreeBSD hardware list? If not, are you 
using a third-party driver?

How do you configure your wireless driver? Using what software/scripts? 
Don't skip details please.

Trying a non-DHCP config for testing might help. See if you can ping. 
Can you ping your own IP of the wireless card, locally? Can you ping the 
broadcast IP for it?

Is there any firewalling capability in your kernel/loaded modules?

I assume the card is working neat on XP. Have you tried it after 
rebooting freebsd without actually going into XP? XP may set up some 
BIOS parameters which FreeBSD doesn't like?

Regards,

--
Alin-Adrian Anton
Reversed Hell Networks
GPG keyID 0x1E2FFF2E (2963 0C11 1AF1 96F6 0030 6EE9 D323 639D 1E2F FF2E)
gpg --keyserver pgp.mit.edu --recv-keys 1E2FFF2E
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


wireless usb atmel driver

2004-04-02 Thread Anton Alin-Adrian
Hi folks!

I am killing myself trying to compile http://www.vitsch.net/bsd/atuwi/ 
driver on 5.2.1-RELEASE.

The driver is written for 5.1. I also received working sources from the 
author, for 5.2.1-RELEASE but they don't compile.

I would really appreciate any hints.

I want to ask you if there is any difference between 
net/if_ieee80211.h and dev/owi/if_ieee80211.h, because I had to 
modify the source and use the later, so I wonder if this could be 
affecting the compilation.

Also, after fixing the include I get stuck at this point:

In file included from /usr/src/sys/dev/usb/if_atuwi.c:82:
@/dev/usb/if_atuwireg.h:275: warning: declaration does not declare anything
Where one can easely look and see that line 275 is:
---cut---
SLIST_HEAD(atuwi_list_head, atuwi_chain);
---cut---
That is part of the following context:
---cut---
struct atuwi_chain {
struct atuwi_softc  *atuwi_sc;
usbd_xfer_handleatuwi_xfer;
char*atuwi_buf;
struct mbuf *atuwi_mbuf;
u_int8_tatuwi_idx;
u_int16_t   atuwi_length;
#ifdef ATUWI_LAZY_TX_NETISR
u_int8_tatuwi_not_freed;
#endif /* ATUWI_LAZY_TX_NETISR */
SLIST_ENTRY(atuwi_chain)atuwi_list;
};
struct atuwi_cdata {
struct atuwi_chain  atuwi_tx_chain[ATUWI_TX_LIST_CNT];
struct atuwi_chain  atuwi_rx_chain[ATUWI_RX_LIST_CNT];
struct atuwi_chain  atuwi_mgmt_chain[ATUWI_MGMT_LIST_CNT];
SLIST_HEAD(atuwi_list_head, atuwi_chain); /* -- HERE */
struct atuwi_list_head  atuwi_rx_free;
struct atuwi_list_head  atuwi_tx_free;
struct atuwi_list_head  atuwi_mgmt_free;
u_int8_tatuwi_tx_inuse;
u_int8_tatuwi_tx_last_idx;
};
---cut---
The complete error barking:
---cut---
Warning: Object directory not changed from original 
/usr/src/sys/modules/atuwi
cc -O -pipe -mcpu=pentiumpro  -D_KERNEL -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -std=c99 
-DKLD_MODULE -nostdinc -I-   -I. -I@ -I@/../include -finline-limit=15000 
-fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2 
-ffreestanding -Wall -Wredundant-decls -Wnested-externs 
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline 
-Wcast-qual  -fformat-extensions -std=c99 -c 
/usr/src/sys/modules/atuwi/../../dev/usb/if_atuwi.c
In file included from /usr/src/sys/dev/usb/if_atuwi.c:82:
@/dev/usb/if_atuwireg.h:275: warning: declaration does not declare anything
/usr/src/sys/dev/usb/if_atuwi.c: In function `atuwi_attach':
/usr/src/sys/dev/usb/if_atuwi.c:2021: error: invalid application of 
`sizeof' to an incomplete type
/usr/src/sys/dev/usb/if_atuwi.c: In function `atuwi_handle_mgmt_packet':
/usr/src/sys/dev/usb/if_atuwi.c:2392: error: 
`IEEE80211_CAPINFO_SHORT_PREAMBLE' undeclared (first use in this function)
/usr/src/sys/dev/usb/if_atuwi.c:2392: error: (Each undeclared identifier 
is reported only once
/usr/src/sys/dev/usb/if_atuwi.c:2392: error: for each function it 
appears in.)
*** Error code 1

Stop in /usr/src/sys/modules/atuwi.
---cut---
I tried replacing line 275 with:
---cut---
SLIST_HEAD(atuwi_list_head, atuwi_chain)atuwi_list;
---cut---
And the error output from the compilation attempt becomes:

---cut---
Warning: Object directory not changed from original 
/usr/src/sys/modules/atuwi
cc -O -pipe -mcpu=pentiumpro  -D_KERNEL -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -std=c99 
-DKLD_MODULE -nostdinc -I-   -I. -I@ -I@/../include -finline-limit=15000 
-fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2 
-ffreestanding -Wall -Wredundant-decls -Wnested-externs 
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline 
-Wcast-qual  -fformat-extensions -std=c99 -c 
/usr/src/sys/modules/atuwi/../../dev/usb/if_atuwi.c
/usr/src/sys/dev/usb/if_atuwi.c: In function `atuwi_attach':
/usr/src/sys/dev/usb/if_atuwi.c:2021: error: invalid application of 
`sizeof' to an incomplete type
/usr/src/sys/dev/usb/if_atuwi.c: In function `atuwi_handle_mgmt_packet':
/usr/src/sys/dev/usb/if_atuwi.c:2392: error: 
`IEEE80211_CAPINFO_SHORT_PREAMBLE' undeclared (first use in this function)
/usr/src/sys/dev/usb/if_atuwi.c:2392: error: (Each undeclared identifier 
is reported only once
/usr/src/sys/dev/usb/if_atuwi.c:2392: error: for each function it 
appears in.)
*** Error code 1

Stop in /usr/src/sys/modules/atuwi.
---cut---
So no more error on line 275 from if_atuwireg.h, but I don't know if 
that is the correct fix, and I don't know why it is still not compiling 
(and if those 2 incompatibilities are related or not).

If anyone is kind enough to share me a hand of help, it is heavely 
appreciated.

Thanks!

Best Regards,

--
Alin-Adrian Anton

wireless usb atmel driver

2004-04-02 Thread Anton Alin-Adrian
Hi folks!

I am killing myself trying to compile http://www.vitsch.net/bsd/atuwi/ 
driver on 5.2.1-RELEASE.

The driver is written for 5.1. I also received working sources from the 
author, for 5.2.1-RELEASE but they don't compile.

I would really appreciate any hints.

I want to ask you if there is any difference between 
net/if_ieee80211.h and dev/owi/if_ieee80211.h, because I had to 
modify the source and use the later, so I wonder if this could be 
affecting the compilation.

Also, after fixing the include I get stuck at this point:

In file included from /usr/src/sys/dev/usb/if_atuwi.c:82:
@/dev/usb/if_atuwireg.h:275: warning: declaration does not declare anything
Where one can easely look and see that line 275 is:
---cut---
SLIST_HEAD(atuwi_list_head, atuwi_chain);
---cut---
That is part of the following context:
---cut---
struct atuwi_chain {
struct atuwi_softc  *atuwi_sc;
usbd_xfer_handleatuwi_xfer;
char*atuwi_buf;
struct mbuf *atuwi_mbuf;
u_int8_tatuwi_idx;
u_int16_t   atuwi_length;
#ifdef ATUWI_LAZY_TX_NETISR
u_int8_tatuwi_not_freed;
#endif /* ATUWI_LAZY_TX_NETISR */
SLIST_ENTRY(atuwi_chain)atuwi_list;
};
struct atuwi_cdata {
struct atuwi_chain  atuwi_tx_chain[ATUWI_TX_LIST_CNT];
struct atuwi_chain  atuwi_rx_chain[ATUWI_RX_LIST_CNT];
struct atuwi_chain  atuwi_mgmt_chain[ATUWI_MGMT_LIST_CNT];
SLIST_HEAD(atuwi_list_head, atuwi_chain); /* -- HERE */
struct atuwi_list_head  atuwi_rx_free;
struct atuwi_list_head  atuwi_tx_free;
struct atuwi_list_head  atuwi_mgmt_free;
u_int8_tatuwi_tx_inuse;
u_int8_tatuwi_tx_last_idx;
};
---cut---
The complete error barking:
---cut---
Warning: Object directory not changed from original 
/usr/src/sys/modules/atuwi
cc -O -pipe -mcpu=pentiumpro  -D_KERNEL -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -std=c99 
-DKLD_MODULE -nostdinc -I-   -I. -I@ -I@/../include -finline-limit=15000 
-fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2 
-ffreestanding -Wall -Wredundant-decls -Wnested-externs 
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline 
-Wcast-qual  -fformat-extensions -std=c99 -c 
/usr/src/sys/modules/atuwi/../../dev/usb/if_atuwi.c
In file included from /usr/src/sys/dev/usb/if_atuwi.c:82:
@/dev/usb/if_atuwireg.h:275: warning: declaration does not declare anything
/usr/src/sys/dev/usb/if_atuwi.c: In function `atuwi_attach':
/usr/src/sys/dev/usb/if_atuwi.c:2021: error: invalid application of 
`sizeof' to an incomplete type
/usr/src/sys/dev/usb/if_atuwi.c: In function `atuwi_handle_mgmt_packet':
/usr/src/sys/dev/usb/if_atuwi.c:2392: error: 
`IEEE80211_CAPINFO_SHORT_PREAMBLE' undeclared (first use in this function)
/usr/src/sys/dev/usb/if_atuwi.c:2392: error: (Each undeclared identifier 
is reported only once
/usr/src/sys/dev/usb/if_atuwi.c:2392: error: for each function it 
appears in.)
*** Error code 1

Stop in /usr/src/sys/modules/atuwi.
---cut---
I tried replacing line 275 with:
---cut---
SLIST_HEAD(atuwi_list_head, atuwi_chain)atuwi_list;
---cut---
And the error output from the compilation attempt becomes:

---cut---
Warning: Object directory not changed from original 
/usr/src/sys/modules/atuwi
cc -O -pipe -mcpu=pentiumpro  -D_KERNEL -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -std=c99 
-DKLD_MODULE -nostdinc -I-   -I. -I@ -I@/../include -finline-limit=15000 
-fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2 
-ffreestanding -Wall -Wredundant-decls -Wnested-externs 
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline 
-Wcast-qual  -fformat-extensions -std=c99 -c 
/usr/src/sys/modules/atuwi/../../dev/usb/if_atuwi.c
/usr/src/sys/dev/usb/if_atuwi.c: In function `atuwi_attach':
/usr/src/sys/dev/usb/if_atuwi.c:2021: error: invalid application of 
`sizeof' to an incomplete type
/usr/src/sys/dev/usb/if_atuwi.c: In function `atuwi_handle_mgmt_packet':
/usr/src/sys/dev/usb/if_atuwi.c:2392: error: 
`IEEE80211_CAPINFO_SHORT_PREAMBLE' undeclared (first use in this function)
/usr/src/sys/dev/usb/if_atuwi.c:2392: error: (Each undeclared identifier 
is reported only once
/usr/src/sys/dev/usb/if_atuwi.c:2392: error: for each function it 
appears in.)
*** Error code 1

Stop in /usr/src/sys/modules/atuwi.
---cut---
So no more error on line 275 from if_atuwireg.h, but I don't know if 
that is the correct fix, and I don't know why it is still not compiling 
(and if those 2 incompatibilities are related or not).

If anyone is kind enough to share me a hand of help, it is heavely 
appreciated.

Thanks!

Best Regards,
--
Alin-Adrian Anton

short analysys of qmail integer overflow bug - let there be light

2004-01-20 Thread Anton Alin-Adrian
Hey folks.

There are rumors out there that setting /var/qmail/control/databytes to 
a reasonable value (for example 16384 = 16MB) will prevent the 
possibility of exploitation regarding the integer overflow in function 
blast().

That is not true.

This is how blast() is called:

void smtp_data() {
 int hops;
 unsigned long qp;
 char *qqx;
 if (!seenmail) { err_wantmail(); return; }
 if (!rcptto.len) { err_wantrcpt(); return; }
 seenmail = 0;
 if (databytes) bytestooverflow = databytes + 1;
 if (qmail_open(qqt) == -1) { err_qqt(); return; }
 qp = qmail_qp(qqt);
 out(354 go ahead\r\n);
 received(qqt,SMTP,local,remoteip,remotehost,remoteinfo,fakehelo);
 blast(hops);
 hops = (hops = MAXHOPS);
 if (hops) qmail_fail(qqt);
 qmail_from(qqt,mailfrom.s);
 qmail_put(qqt,rcptto.s,rcptto.len);
 qqx = qmail_close(qqt);
 if (!*qqx) { acceptmessage(qp); return; }
 if (hops) { out(554 too many hops, this message is looping 
(#5.4.6)\r\n); return; }
 if (databytes) if (!bytestooverflow) { out(552 sorry, that message 
size exceeds my databytes limit (#5.3.4)\r\n); return; }
 if (*qqx == 'D') out(554 ); else out(451 );
 out(qqx + 1);
 out(\r\n);
}

So you see, the input value is only checked against the databytes limit 
*after* the function blast() is called. The overflow resides in function 
blast(), thus even setting databytes to 1 (lowest possible value) will 
not prevent the overflow to happen.  People should not comment a bug 
without reading the code. (not from this mailing list).

The simplest way to fix is to define pos variable as unsigned int 
instead of int, in the blast() function.

What happens in blast()? Here what happens:

Input is read byte by byte, and if input byte != '\n', then pos is 
incremented. This is a neverending loop, without any logical tests. 
Thus, pos gets an upper-bounds overflow and becomes negative (because 
it is a signed integer). If it is defined as unsigned, it simply becomes 
0, and keeps being incremented in a neverending circle loop, untill the 
first '\n' is met. This renders any hack attack useless. DOS is 
possible, but DOS is possible in many other more effective ways. It's 
the way of the Internet protocols.

This is the original blast() function:

void blast(hops)
int *hops;
{
 char ch;
 int state;
 int flaginheader;
/* my comment here: unsigned int pos */
 int pos; /* number of bytes since most recent \n, if fih */
 int flagmaybex; /* 1 if this line might match RECEIVED, if fih */
 int flagmaybey; /* 1 if this line might match \r\n, if fih */
 int flagmaybez; /* 1 if this line might match DELIVERED, if fih */
 state = 1;
 *hops = 0;
 flaginheader = 1;
 pos = 0; flagmaybex = flagmaybey = flagmaybez = 1;
 for (;;) {
   substdio_get(ssin,ch,1);
   if (flaginheader) {
 if (pos  9) {
   if (ch != delivered[pos]) if (ch != DELIVERED[pos]) 
flagmaybez = 0;
   if (flagmaybez) if (pos == 8) ++*hops;
   if (pos  8)
 if (ch != received[pos]) if (ch != RECEIVED[pos]) 
flagmaybex = 0;
   if (flagmaybex) if (pos == 7) ++*hops;
   if (pos  2) if (ch != \r\n[pos]) flagmaybey = 0;
   if (flagmaybey) if (pos == 1) flaginheader = 0;
 }
 ++pos;
 if (ch == '\n') { pos = 0; flagmaybex = flagmaybey = flagmaybez = 1; }
   }
   switch(state) {
 case 0:
   if (ch == '\n') straynewline();
   if (ch == '\r') { state = 4; continue; }
   break;
 case 1: /* \r\n */
   if (ch == '\n') straynewline();
   if (ch == '.') { state = 2; continue; }
   if (ch == '\r') { state = 4; continue; }
   state = 0;
   break;
 case 2: /* \r\n + . */
   if (ch == '\n') straynewline();
   if (ch == '\r') { state = 3; continue; }
   state = 0;
   break;
 case 3: /* \r\n + .\r */
   if (ch == '\n') return;
   put(.);
   put(\r);
   if (ch == '\r') { state = 4; continue; }
   state = 0;
   break;
 case 4: /* + \r */
   if (ch == '\n') { state = 1; break; }
   if (ch != '\r') { put(\r); state = 0; }
   }
   put(ch);
 }
}

One can see that pos is later used as an index for memory location. And 
that's all folks. :) I say it is exploitable. Just an opinion.

Cheers to all,
Alin-Adrian Anton.
Below there is a small rfc821 line too long implementing patch:

--- qmail-smtpd.c.origMon Jun 15 13:53:16 1998
+++ qmail-smtpd.cMon Jan 19 23:29:35 2004
@@ -1,3 +1,15 @@
+/*
+*This is a patched version of qmail, implementing RFC 821 regarding 
text line limitations.
+*Developed by Alin-Adrian Anton 
([EMAIL PROTECTED],[EMAIL PROTECTED])
+*
+*You may remove this banner if it annoys you. This patch is public 
domain, for the
+*benefit of the community.
+*
+*It also fixes an integer overflow in the blast() function.
+NOTE: it implements the most relaxed RFC821, as it is specified there.
+*/
+
+
#include sig.h
#include readwrite.h
#include stralloc.h
@@ -48,7 +60,6 @@
void die_control() { out(421 unable to read controls (#4.3.0)\r\n); 
flush(); _exit(1); }
void 

qmail remote root patch

2004-01-19 Thread Anton Alin-Adrian
Regarding latest qmail vulnerability, I coded this quickly patch. Please 
double-check me if I am wrong here. Forward this to freebsd-security please.

Regards,
Alin.
320c320
   ++pos;
---
   if (pos9) ++pos;
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: qmail remote root patch

2004-01-19 Thread Anton Alin-Adrian
Anton Alin-Adrian wrote:

Regarding latest qmail vulnerability, I coded this quickly patch. 
Please double-check me if I am wrong here. Forward this to 
freebsd-security please.

Regards,
Alin.


320c320
   ++pos;
---
 

 if (pos9) ++pos;
   



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]
   

I forgot to mention about vuln:

http://www.guninski.com/qmailcrash.html
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: qmail remote root patch

2004-01-19 Thread Anton Alin-Adrian
Anton Alin-Adrian wrote:

Anton Alin-Adrian wrote:

Regarding latest qmail vulnerability, I coded this quickly patch. 
Please double-check me if I am wrong here. Forward this to 
freebsd-security please.

Regards,
Alin.


320c320
   ++pos;
---
 

 if (pos9) ++pos;
  
 

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to 
[EMAIL PROTECTED]
  

I forgot to mention about vuln:

http://www.guninski.com/qmailcrash.html

Actually that was utterly wrong. I think this works:
bash-2.05b$ diff -a qmail-smtpd.c qmail-smtpd-patched.c
318a319
   ++pos;
320d320
   ++pos;
The patched function will look like:
void blast(hops)
int *hops;
{
 char ch;
 int state;
 int flaginheader;
 int pos; /* number of bytes since most recent \n, if fih */
 int flagmaybex; /* 1 if this line might match RECEIVED, if fih */
 int flagmaybey; /* 1 if this line might match \r\n, if fih */
 int flagmaybez; /* 1 if this line might match DELIVERED, if fih */
 state = 1;
 *hops = 0;
 flaginheader = 1;
 pos = 0; flagmaybex = flagmaybey = flagmaybez = 1;
 for (;;) {
   substdio_get(ssin,ch,1);
   if (flaginheader) {
 if (pos  9) {
   if (ch != delivered[pos]) if (ch != DELIVERED[pos]) 
flagmaybez = 0;
   if (flagmaybez) if (pos == 8) ++*hops;
   if (pos  8)
 if (ch != received[pos]) if (ch != RECEIVED[pos]) 
flagmaybex = 0;
   if (flagmaybex) if (pos == 7) ++*hops;
   if (pos  2) if (ch != \r\n[pos]) flagmaybey = 0;
   if (flagmaybey) if (pos == 1) flaginheader = 0;
   ++pos;
 }
 if (ch == '\n') { pos = 0; flagmaybex = flagmaybey = flagmaybez = 1; }
   }
   switch(state) {
 case 0:
   if (ch == '\n') straynewline();
   if (ch == '\r') { state = 4; continue; }
   break;
 case 1: /* \r\n */
   if (ch == '\n') straynewline();
   if (ch == '.') { state = 2; continue; }
   if (ch == '\r') { state = 4; continue; }
   state = 0;
   break;
 case 2: /* \r\n + . */
   if (ch == '\n') straynewline();
   if (ch == '\r') { state = 3; continue; }
   state = 0;
   break;
 case 3: /* \r\n + .\r */
   if (ch == '\n') return;
   put(.);
   put(\r);
   if (ch == '\r') { state = 4; continue; }
   state = 0;
   break;
 case 4: /* + \r */
   if (ch == '\n') { state = 1; break; }
   if (ch != '\r') { put(\r); state = 0; }
   }
   put(ch);
 }
}

So what I did is move ++pos; into the if (pos  9) block. Originally it 
is right after the } ending that block.

This works if pos gets incremented as 
pos=1,2,.9,10,...,max,...,upper-overflow(negative).

This utterly fails if pos is not incremented like that.

Any ideas? I think it works, after a first look at the incrementation loop.

Sorry for all other mails, I am stressed . (need to calm down i know)

Alin.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: qmail remote root patch

2004-01-19 Thread Anton Alin-Adrian
This is the patch I am currently using, for qmail-smtpd.c . I don't dare 
to touch RFC because I did not carefully read qmail sources and I am not 
aware of details/impact.

I think this patch is good enough to simply remove the vulnerability.

I now looked more thoroughly at the code and ask other's opinions. I 
think this is really ok patch..

Regards,
Alin.


318a319
   ++pos;
320d320
   ++pos;
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: qmail remote root final patch

2004-01-19 Thread Anton Alin-Adrian
--- qmail-smtpd.c   Mon Jun 15 13:53:16 1998
+++ qmail-smtpd-patched.c   Mon Jan 19 15:22:23 2004
@@ -316,8 +316,8 @@
if (flagmaybex) if (pos == 7) ++*hops;
if (pos  2) if (ch != \r\n[pos]) flagmaybey = 0;
if (flagmaybey) if (pos == 1) flaginheader = 0;
+   ++pos;
  }
-  ++pos;
  if (ch == '\n') { pos = 0; flagmaybex = flagmaybey = flagmaybez = 
1; }
}
switch(state) {

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: qmail remote root patch

2004-01-19 Thread Anton Alin-Adrian
Dinesh Nair wrote:

On Mon, 19 Jan 2004, Anton Alin-Adrian wrote:
 

Regarding latest qmail vulnerability, I coded this quickly patch.
Please double-check me if I am wrong here. Forward this to
freebsd-security please.
320c320
   ++pos;
---
 

if (pos9) ++pos;
   

http://www.guninski.com/qmailcrash.html
   

woulnd't it be better to switch pos from an int to a u_int ? or do
specific bounds checking before incrementing pos ? this patch seems to
_only_ increment pos if it's  9, and reading the code will show you where
you're going to get into some problems. :)
Regards,   /\_/\   All dogs go to heaven.
[EMAIL PROTECTED](0 0)http://www.alphaque.com/
+==oOO--(_)--OOo==+
| for a in past present future; do|
|   for b in clients employers associates relatives neighbours pets; do   |
|   echo The opinions here in no way reflect the opinions of my $a $b.  |
| done; done  |
+=+


 

Please look in the thread, I already posted:

--- qmail-smtpd.c   Mon Jun 15 13:53:16 1998
+++ qmail-smtpd-patched.c   Mon Jan 19 15:22:23 2004
@@ -316,8 +316,8 @@
if (flagmaybex) if (pos == 7) ++*hops;
if (pos  2) if (ch != \r\n[pos]) flagmaybey = 0;
if (flagmaybey) if (pos == 1) flaginheader = 0;
+   ++pos;
  }
-  ++pos;
  if (ch == '\n') { pos = 0; flagmaybex = flagmaybey = flagmaybez = 1; }
}
switch(state) {


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: qmail remote patch

2004-01-19 Thread Anton Alin-Adrian
This patch attempts to implement rfc821 a bit. Also it defines the pos 
var as unsigned. Working till now..

--- qmail-smtpd.c.orig  Mon Jun 15 13:53:16 1998
+++ qmail-smtpd.c   Mon Jan 19 23:29:35 2004
@@ -1,3 +1,15 @@
+/*
+*  This is a patched version of qmail, implementing RFC 821 
regarding text line limitations.
+*  Developed by Alin-Adrian Anton 
([EMAIL PROTECTED],[EMAIL PROTECTED])
+*
+*  You may remove this banner if it annoys you. This patch is 
public domain, for the
+*  benefit of the community.
+*
+*  It also fixes an integer overflow in the blast() function.
+   NOTE: it implements the most relaxed RFC821, as it is specified 
there.
+*/
+
+
#include sig.h
#include readwrite.h
#include stralloc.h
@@ -48,7 +60,6 @@
void die_control() { out(421 unable to read controls (#4.3.0)\r\n); 
flush(); _exit(1); }
void die_ipme() { out(421 unable to figure out my IP addresses 
(#4.3.0)\r\n); flush(); _exit(1); }
void straynewline() { out(451 See 
http://pobox.com/~djb/docs/smtplf.html.\r\n;); flush(); _exit(1); }
-
void err_bmf() { out(553 sorry, your envelope sender is in my 
badmailfrom list (#5.7.1)\r\n); }
void err_nogateway() { out(553 sorry, that domain isn't in my list of 
allowed rcpthosts (#5.7.1)\r\n); }
void err_unimpl() { out(502 unimplemented (#5.5.1)\r\n); }
@@ -58,7 +69,7 @@
void err_noop() { out(250 ok\r\n); }
void err_vrfy() { out(252 send some mail, i'll try my best\r\n); }
void err_qqt() { out(451 qqt failure (#4.3.0)\r\n); }
-
+void err_longline() { out(500 Line too long, please read RFC 
821.\r\n); flush(); _exit(1); }

stralloc greeting = {0};

@@ -293,10 +304,46 @@
void blast(hops)
int *hops;
{
+
+/*
+*RFC 821  August 1982
+*   Simple Mail Transfer Protocol
+*
+*text line
+*
+*   The maximum total length of a text line including the
+*   CRLF is 1000 characters (but not counting the leading
+*   dot duplicated for transparency).
+*
+*recipients buffer
+*
+*   The maximum total number of recipients that must be
+*   buffered is 100 recipients.
+*
+*
+*  
+*  *  *
+*  *  TO THE MAXIMUM EXTENT POSSIBLE, IMPLEMENTATION  *
+*  *  TECHNIQUES WHICH IMPOSE NO LIMITS ON THE LENGTH *
+*  *  OF THESE OBJECTS SHOULD BE USED.*
+*  *  *
+*  
+*
+* Errors due to exceeding these limits may be reported by using
+* the reply codes, for example:
+*
+*500 Line too long.
+*
+*501 Path too long
+*
+*552 Too many recipients.
+*
+*552 Too much mail data.
+*/
  char ch;
  int state;
  int flaginheader;
-  int pos; /* number of bytes since most recent \n, if fih */
+  unsigned int pos; /* number of bytes since most recent \n, if fih */
  int flagmaybex; /* 1 if this line might match RECEIVED, if fih */
  int flagmaybey; /* 1 if this line might match \r\n, if fih */
  int flagmaybez; /* 1 if this line might match DELIVERED, if fih */
@@ -317,7 +364,8 @@
if (pos  2) if (ch != \r\n[pos]) flagmaybey = 0;
if (flagmaybey) if (pos == 1) flaginheader = 0;
  }
-  ++pos;
+if (++pos65535-1) err_longline(); /* will bail out nicely with 
err 500 */
+
  if (ch == '\n') { pos = 0; flagmaybex = flagmaybey = flagmaybez = 
1; }
}
switch(state) {

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Happy and Wonderfull New Year !

2003-12-29 Thread Anton Alin-Adrian
I would like to thank again the FreeBSD hackers for their support during 
this passing year, and I wish you all the best wishes I have for my own 
self. Also I thank you for developing and hacking the best operating 
system out there!

It may be a bit early for this, but I am going to spend the New Year's 
Eve on top of the mountains, without functional gprs/cda. (at least i'll 
be on the edge :D)

Best wishes, friends !

Yours sincerely,
Alin-Adrian Anton.


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Power consumption in desktop computers

2003-12-25 Thread Anton Alin-Adrian
Martin Cracauer wrote:

Hi,

those who followed might have noticed I was shopping for a notebook to
replace some of my desktop system.  To make it short, the notebook
vendors all pissed me off so good that I'm not going to get a notebook
(details on request) so I am going for other options.
Here is what my powermeter thinks my desktops are using with various
options:
System 1 (wavehh, FreeBSD-4-stable):
- 1300 MHz Celeron
- Asus P2B board
- 3x 256 MB ECC modules
- 2x Intel 82855 fxp cards
- 3.5 Floppy 
- Promise PCI IDE controller
- Matrox G-400 (G-450?) 32 MB dual-head
- 35772MB IBM-DPTA-353750 
- 76345MB MAXTOR 6L080J4
- DVD-ROM JLMS XJ-HD165H
- CD-RW 32X10 at ata1-master WDMA2

Base power consumption with all drives: 99 watts
- No drives connected: 82 watts
- CD-Writer and DVD each take 1 watt when idle
- Maxtor disk takes 8-10 watts
- IBM disk takes 6-8 watts
- replacing the G-400 with some random plain S3 saves 4 watts
- forgot to measure what the fxp cards draw, but they get pretty hot,
 I assume it is not neglectable
System 2: libber, Linux-2.6.0 and Win2K (yes, that's supposed to
become my FreeBSD-current system when I figure out why the CD-writer
broke on my move):
- Asus A7V600 Via KT600
- AMD Athlon XP 2500+ 1.83GHz
- 1x 512 MB non-ECC module
- ATI Radeon 7500 LE 128 MB incl ventilator
- Maxtor 6Y060P0 60 GB drive
- TOSHIBA DVD-ROM SD-R5112 (DVD-R writer)
- Adaptec 2940 with 3 SCSI CD-ROMS, picked up for $1 each on MIT
 swapfest
- TV card (model escapes me right now)
- 8139 Ethernet (doesn't get as hot as the fxp cards)
NOTE: this is the new Athlon core, this CPU takes less power than
e.g. the 2600+ and 2400+ which are based on the old core.
Base system with all drives:148 watts
- DVD writer idle:2 watts
- 3x SCSI CD:20 watts (ups...)
- harddrive   5 watts
- no video card:-23 watts
 (not sure the system goes into proper startup with no video)
- replace ATI card with G-400   -15 watts
 (16 MB card, not the save card as above)
- TV card out-6 watts
- SCSI card out  -1 watt
- Realtek 8139 out   -1 watt
Harddisk activity: find / -name laksjfla:		 adds 1 watt

When Linux is driven with make CPU halt calls when idle the 148
watts go down to 136 when the system is idle, and up from that by 25
watts on drystone munching.
Remarks:

I assume that you can build a pretty nice powersaving box if you use
one of the Intel chipsets with 852/855 GM onboard video.
I am surprised the harddrives take so few power, but the numbers are
clear.  I was near replacing them with notebook drives, glad I
measured.
Don't pick up 10 year old hardware on flea markets if you want to save
power :-)
My old 20 Hitachi superscan Elite 751 takes more than twice the power
than the new el-cheapo MAG 19.
For some reason the AMD box draws about 5 watts when turned off.
Power supply change may be a good idea.
 

Transmeta processors and transmeta-based systems are famous for their 
blinding low-power consumption.

Alin.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Merry Christmas Everyone!

2003-12-24 Thread Anton Alin-Adrian
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]