Re: BIND and CNAME-ing

2008-07-24 Thread Almir Karic
On Wed, Jul 23, 2008 at 01:17:04PM -0700, Parvinder Bhasin wrote:
 Hi,

 I am stuck at this situation:

 Where I have a domain:  abc.com :

 I would like to have user who type  http://abc.com (without the www)  
 redirected to a a different site for example :  www.xyz.com
 Redirection for www.abc.com to www.xyz.com works fine.

 I have tried CNAME-ing abc.com to www.xyz.com but that wouldn't work (I 
 can see it why).
 Is there a way to do this in BIND zone configuration?

with this in my zone i get to google.com when i try to access
test.mydomain.org:

testIN  CNAME   google.com.


-- 
vi vi vi -- the number fo the beast



Re: CARP not leaving backup state

2008-07-24 Thread Janne Johansson

William Stuart wrote:

Hello everyone,

I am sorry for not mentioning it was a vmWare instance.  The packet 
replay seemed to be the culprit.


This occured when we moved the image to a vmWare host running vmWare ESX 
3.5 from 3.0.  Our working theory is that under 3.5 pernicious mode 
works differently than under 3.0 and replays all of the traffic.


Has anyone else experienced this problem?


We have also experienced problems with CARP when moving ESX from 3.0i to 
3.5. No solution yet.




Re: crunchide - problem in running in solaris nfs

2008-07-24 Thread viq
On Wed, Jul 23, 2008 at 10:09:10PM -0700, IanKwa wrote:
 Hi, I am using openbsd 3.6 to crunch on codes from Solaris 10 NFS. The
 problem is when I am use crunch in NFS I always encounter multiple
 definitions. However, when I crunch in the openbsd 3.6 local machine, I do
 not encounter the problems. I tried to further investigate and found out
 that if I compile and link the code in NFS then run copy all the .lo and .o
 file to the openbsd 3.6 machine and run crunchide, it will work fine.
 Could kind soul please help? Thanks in advance.

I believe the common advice will be to start by updating to something less
ancient than a 4 years old system.

 --
 View this message in context:
http://www.nabble.com/crunchide---problem-in-running-in-solaris-nfs-tp1862549
6p18625496.html
 Sent from the openbsd user - misc mailing list archive at Nabble.com.

--
viq

[demime 1.01d removed an attachment of type application/pgp-signature]



tac - concatenate and print files in reverse

2008-07-24 Thread Tony Berth
I wasn't able to find 'tac' in OpenBSD! Is any reason for that or any
alternative?

Thanks for your help

Tony



Re: tac - concatenate and print files in reverse

2008-07-24 Thread Paul de Weerd
On Thu, Jul 24, 2008 at 12:17:31PM +0200, Tony Berth wrote:
| I wasn't able to find 'tac' in OpenBSD! Is any reason for that or any
| alternative?

tail -r

Cheers,

Paul 'WEiRD' de Weerd

--
[++-]+++.+++[---].+++[+
+++-].++[-]+.--.[-]
 http://www.weirdnet.nl/

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: tac - concatenate and print files in reverse

2008-07-24 Thread Stuart Henderson
On 2008-07-24, Tony Berth [EMAIL PROTECTED] wrote:
 I wasn't able to find 'tac' in OpenBSD! Is any reason for that or any
 alternative?

Depending on which sort of reverse you mean, one of rev(1) or
tail(1) will do what you want.



Re: Is this a bug in PFCTL?

2008-07-24 Thread Duncan Patton a Campbell
On Wed, 23 Jul 2008 20:41:05 -0300
Vinicius Vianna [EMAIL PROTECTED] wrote:

 Maybe the only value would be to merge a new rule without returning all 
 tables to default as in the situation that you have changed a table and 
 if you run pfctl -f /etc/pf.conf the table will get back to original values?
 Never had to use it too, but someone may need it sometime?

That's what I was assuming but no.  As Henning sez it sets only options 
and requires a reload of the ruleset anyways... which doesn't buy anything
over writing a new ruleset and loading it.  I'd guess it's some incomplete
functionality that has found no strong justification to finnish.  

 
 Henning Brauer escreveu:
  hmm that is broken.

That turns out to have been finger fumbling on my part...

Dhu

 
  not that i really see value in -m



Re: tac - concatenate and print files in reverse

2008-07-24 Thread Tony Berth
On Thu, Jul 24, 2008 at 12:34 PM, Stuart Henderson [EMAIL PROTECTED]
wrote:

 On 2008-07-24, Tony Berth [EMAIL PROTECTED] wrote:
  I wasn't able to find 'tac' in OpenBSD! Is any reason for that or any
  alternative?

 Depending on which sort of reverse you mean, one of rev(1) or
 tail(1) will do what you want.



'tail -r' did the job!

Thanks a lot for your help

Cheers

Tony



WikiCE - Enciclopédia Espiritual online

2008-07-24 Thread WikiCE - Enciclopédia Espiritual online
WIKICE - PRESS RELEASE

A WikiCE C) uma enciclopC)dia espiritual livre que estC! a ser escrita com a
colaboraC'C#o dos seus leitores.

Cum projecto sem fins lucrativos que tem como objectivo disponibilizar
gratuitamente todo o conhecimento espiritual em lC-ngua portuguesa actualmente
disponC-vel. Tendo como premissa que nos tempos de hoje esse conhecimento
deverC! estar ao alcance de todos, sem restriC'C5es ou custos associados,
construC-mos este site como um instrumento fundamental para alcanC'ar esse
objectivo.

AtravC)s do conceito wiki, C) possC-vel corrigir erros, complementar ideias e
inserir novas informaC'C5es, sendo o conteC:do de um artigo actualizado
graC'as ao conjunto dos utilizadores que o lC*em.

Contamos com a colaboraC'C#o de todos para que possamos fazer crescer este
projecto tC#o necessC!rio, seja atravC)s da divulgaC'C#o do mesmo, seja pela
participaC'C#o directa na ediC'C#o e inclusC#o de novos artigos.

Com o nosso profundo agradecimento,
AdministraC'C#o
http://www.wikice.org http://www.wikice.org/

NOTA: Este projecto foi desenvolvido pela equipa do site Comunidade
Espiritual, a primeira comunidade espiritual online.

http://www.comunidade-espiritual.com http://www.comunidade-espiritual.com/

--

Anular a sua subscriC'C#o mailto:[EMAIL PROTECTED]



named: Binding locally

2008-07-24 Thread Heinrich Rebehn

Hi all,

After patching named on 4.3, it throws *lots* of the above syslog messages:

Jul 24 14:28:31 frw1 named[32206]: Binding locally
Jul 24 14:28:35 frw1 last message repeated 5 times
Jul 24 14:28:42 frw1 named[32206]: Binding locally
Jul 24 14:29:15 frw1 last message repeated 6 times
Jul 24 14:29:19 frw1 last message repeated 2 times
Jul 24 14:29:24 frw1 named[32206]: Binding locally
Jul 24 14:29:26 frw1 last message repeated 2 times
Jul 24 14:29:37 frw1 named[32206]: Binding locally
Jul 24 14:29:37 frw1 last message repeated 2 times
Jul 24 14:29:42 frw1 named[32206]: Binding locally
Jul 24 14:29:48 frw1 last message repeated 4 times
Jul 24 14:29:58 frw1 named[32206]: Binding locally

Is this an error? Or what does it mean?

--

Heinrich Rebehn

University of Bremen
Physics / Electrical and Electronics Engineering
- Department of Telecommunications -

Phone : +49/421/218-4664
Fax   :-3341



mutt and 7bit text

2008-07-24 Thread Tony Berth
I'm running the 4.3 with sendmail and use mutt as MUA. I did set
'assumed_charset' and 'allow_8bit' in muttrc but no effect! I also had a
look on sendmail but couldn't identify any wrongdoing either!

Actually I would rather prefer to have utf-8 for the body as well as for the
subject and header

Thanks for your help

Tony



bioctl output

2008-07-24 Thread John Nietzsche
Dear users,

i have just installed openbsd 4.3 in my dell server and everything
went ok except for on stuff that is teasing me up. It's the bioctl
output:

robigo# bioctl mfi0
Volume  Status   Size Device
 mfi0 0 Online   299439751168 sd0 RAID1
  0 Online   3000 1:0.0   noencl SEAGATE ST3300655SS S527
  1 Online   3000 1:1.0   noencl SEAGATE ST3300655SS S527
 mfi0 1 Online   898319253504 sd1 RAID5
  0 Online   3000 1:2.0   noencl SEAGATE ST3300655SS S527
  1 Online   3000 1:3.0   noencl SEAGATE ST3300655SS S527
  2 Online   3000 1:4.0   noencl SEAGATE ST3300655SS S527
  3 Online   3000 1:5.0   noencl SEAGATE ST3300655SS S527
 mfi0 2 Hot spare   292968750 1:6.0   noencl SEAGATE ST3300655SS S527
robigo#

Below the  RAIDX type column i am seeing noencl. How can i change that?

BTW: i am running on a Dell PowerEdge 2900.

Thanks in advance.



Re: Is this a bug in PFCTL?

2008-07-24 Thread Henning Brauer
* Vinicius Vianna [EMAIL PROTECTED] [2008-07-24 01:52]:
 Maybe the only value would be to merge a new rule

merge a rule?
never ever.
it has, at one point, allowed you to set options without resetting
other options. never rules, that cannot work.

-- 
Henning Brauer, [EMAIL PROTECTED], [EMAIL PROTECTED]
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting - Hamburg  Amsterdam



Re: BIND and CNAME-ing

2008-07-24 Thread Giancarlo Razzolini
Almir Karic escreveu:
 On Wed, Jul 23, 2008 at 01:17:04PM -0700, Parvinder Bhasin wrote:
   
 Hi,

 I am stuck at this situation:

 Where I have a domain:  abc.com :

 I would like to have user who type  http://abc.com (without the www)  
 redirected to a a different site for example :  www.xyz.com
 Redirection for www.abc.com to www.xyz.com works fine.

 I have tried CNAME-ing abc.com to www.xyz.com but that wouldn't work (I 
 can see it why).
 Is there a way to do this in BIND zone configuration?
 

 with this in my zone i get to google.com when i try to access
 test.mydomain.org:

 testIN  CNAME   google.com.


   
This works, yes. But you can't have a CNAME that has the same name as
the zone. It would conflict with the SOA and with the NS entries.
Parvinder will have to use it's scripts to make this work, as he can't
use http redirect.

My regards,

-- 
Giancarlo Razzolini
http://lock.razzolini.adm.br
Linux User 172199
Red Hat Certified Engineer no:804006389722501
Verify:https://www.redhat.com/certification/rhce/current/
Moleque Sem Conteudo Numero #002
OpenBSD Stable
Ubuntu 8.04 Hardy Heron
4386 2A6F FFD4 4D5F 5842  6EA0 7ABE BBAB 9C0E 6B85



Intel 82575GB NIC doesn't work

2008-07-24 Thread B A
Hello!



Looks like there is no support for 82575GB NIC in OpenBSD kernel.

I got something like Intel PRO/1000 QP (82575GB) rev 0x02 at pci10 dev 0 
function 0 not

configured

But I found this link for FreeBSD driver

http://downloadcenter.intel.com/Detail_Desc.aspx?ProductID=2874DwnldID=15815lang=eng

Is there any really quick and easy way to make this driver work in OpenBSD ?



Re: This is what Linus Torvalds calls openBSD crowd

2008-07-24 Thread Sunnz
I guess Linus lost his ability to masturbate for a long time huh?


-- 
This e-mail may be confidential. You may not copy, forward,
distribute, or, use any part of it. Note, this text has no effective
legal binding on your part, there is no obligation to abide any or all
parts of this. Treat it with the same level of care as any other
pretending-to-be-law-speaking-but-not-really texts attached to e-mail
messages you normally find on any other e-mails. For more information
about disclaimers, please see:
http://www.goldmark.org/jeff/stupid-disclaimers/



Trouble trying to install texlive

2008-07-24 Thread John Nietzsche
Dear friends,

i am trying to get texlive installed in my computer. Inside the directory i saw:

robigo# pwd;ls -l
/usr/ports/print/texlive
total 28
drwxr-xr-x  2 root  wheel  512 Mar  7 20:59 CVS
-rwxrwxr-x  1 root  wheel  173 Nov  2  2007 Makefile
-rw-rw-r--  1 root  wheel  388 Sep  7  2007 Makefile.inc
drwxr-xr-x  5 root  wheel  512 Jul 24 15:03 base
drwxr-xr-x  4 root  wheel  512 Nov  2  2007 texmf-docs
drwxr-xr-x  4 root  wheel  512 Jul 24 15:01 texmf-full
drwxr-xr-x  5 root  wheel  512 Jul 24 15:02 texmf-minimal
robigo#


I would like to install texmf-full and base. But i realized that base
depends on texmf-minimal.
I am obligated to install texmf-mininall and ended up with the
following packages:

base, texmf-full and texmf-minimal and base

What is the diference between texmf-full and textmf-minimal?

Thanks a lot for your time and cooperation.

best regards.



Re: This is what Linus Torvalds calls openBSD crowd

2008-07-24 Thread Guido Tschakert

Duncan Patton a Campbell schrieb:

On Thu, 17 Jul 2008 21:37:27 +0200
Marc Balmer [EMAIL PROTECTED] wrote:


* Shizzle Cash wrote:

On Jul 17, 2008, at 8:42 AM, Giancarlo Razzolini wrote:


agreed. I barely can wait to see Ty Semaka artwork for 4.4. Definitively
it should include monkeys.  And amoebas too.
I agree, monkeys should definitely be somehow incorporated into the artwork 
for the next release.

ty draws openbsd developers as fish.  and I think that we, the openbsd
developers, did enough to warrant a nice topic for the next release.
no need to resort to that strange monkey business.

or do you want to honour a stupid remark made by l. by making him
the main theme of our next release?  I don't think so.  we have
more substantial work that goes into our next release than the
stupid remark of a wanking fat penguin that all to obviously does
not understand what we do.




Wanking Sea Monkeys, then: the oceanic analogue of fleas, 
at least in the area of genital proportion ;-)


Dhu


Sea Monkeys?

I feed my fishes with sea monkeys!


guido



Re: CARP not leaving backup state

2008-07-24 Thread Denis Fondras
We have also experienced problems with CARP when moving ESX from 3.0i to 
3.5. No solution yet.




Have tried to tweak the vSwitch settings ? I remember I made CARP work 
with 2 OpenBSD 4.2 VM on ESX 3.5 after changing some settings in the 
networking properties... (I know I should document what I do...)


Denis



Re: Trouble trying to install texlive

2008-07-24 Thread Predrag Punosevac

John Nietzsche wrote:

Dear friends,

i am trying to get texlive installed in my computer. Inside the directory i saw:

robigo# pwd;ls -l
/usr/ports/print/texlive
total 28
drwxr-xr-x  2 root  wheel  512 Mar  7 20:59 CVS
-rwxrwxr-x  1 root  wheel  173 Nov  2  2007 Makefile
-rw-rw-r--  1 root  wheel  388 Sep  7  2007 Makefile.inc
drwxr-xr-x  5 root  wheel  512 Jul 24 15:03 base
drwxr-xr-x  4 root  wheel  512 Nov  2  2007 texmf-docs
drwxr-xr-x  4 root  wheel  512 Jul 24 15:01 texmf-full
drwxr-xr-x  5 root  wheel  512 Jul 24 15:02 texmf-minimal
robigo#


I would like to install texmf-full and base. But i realized that base
depends on texmf-minimal.
I am obligated to install texmf-mininall and ended up with the
following packages:
  
Yes, because of dependences. Texmf-full means, as the name is 
suggesting, EVERYTHING.




base, texmf-full and texmf-minimal and base

What is the diference between texmf-full and textmf-minimal?

  
If you are planing to write documents is English most likely you do not 
need texmf-full unless you have a very special needs. If plan to you use 
Cyrillic, Chinese, or Arabic you definitely need

texmf-full even for a very simple document.

Texmf-full contains far more macros and special purpose TeX packages 
than texmf-base.


Best,
Predrag


Thanks a lot for your time and cooperation.

best regards.




BIND workaround for older versions?

2008-07-24 Thread Mike Shaw
Regarding the cache poisoning patch (which I see for 4.3).  Are there
any effective workarounds for OpenBSD 4.0/4.1?

I have a couple older boxes I will be upgrading, but I'd like to CMA
in the meantime.

Thanks!
-Mike



Re: bioctl output

2008-07-24 Thread François Chambaud
John Nietzsche [EMAIL PROTECTED] writes:

 Dear users,
 
 i have just installed openbsd 4.3 in my dell server and everything
 went ok except for on stuff that is teasing me up. It's the bioctl
 output:
 
 robigo# bioctl mfi0
 Volume  Status   Size Device
  mfi0 0 Online   299439751168 sd0 RAID1
   0 Online   3000 1:0.0   noencl SEAGATE ST3300655SS 
 S527
   1 Online   3000 1:1.0   noencl SEAGATE ST3300655SS 
 S527
  mfi0 1 Online   898319253504 sd1 RAID5
   0 Online   3000 1:2.0   noencl SEAGATE ST3300655SS 
 S527
   1 Online   3000 1:3.0   noencl SEAGATE ST3300655SS 
 S527
   2 Online   3000 1:4.0   noencl SEAGATE ST3300655SS 
 S527
   3 Online   3000 1:5.0   noencl SEAGATE ST3300655SS 
 S527
  mfi0 2 Hot spare   292968750 1:6.0   noencl SEAGATE ST3300655SS 
 S527
 robigo#
 
 Below the  RAIDX type column i am seeing noencl. How can i change that?
 
 BTW: i am running on a Dell PowerEdge 2900.
 
 Thanks in advance.
 
 
 

noencl for no enclosure.

See ses(4) and read the thread RAID management support coming in
OpenBSD 3.8 from Theo de Raadt:

http://marc.info/?l=openbsd-miscm=112630095818062

Please post a full dmesg of your Dell PowerEdge 2900.

-- 
Francois Chambaud
http://www.chambaud.org



Re: BIND workaround for older versions?

2008-07-24 Thread Aaron Stellman
On Thu, Jul 24, 2008 at 02:48:45PM -0500, Mike Shaw wrote:
 Regarding the cache poisoning patch (which I see for 4.3).  Are there
 any effective workarounds for OpenBSD 4.0/4.1?
 
 I have a couple older boxes I will be upgrading, but I'd like to CMA
 in the meantime.
 
 Thanks!
 -Mike
 
Perhaps you'd want to look at pf workaround to this. look at misc@
archives from 2008-07-19.



Re: Trying to compile cwm on Linux

2008-07-24 Thread Martin Toft
On Wed, Jul 23, 2008 at 10:55:01PM +0200, Martin Toft wrote:
 I'm trying to compile cwm (/usr/xenocara/app/cwm) on Linux, as I would
 like to use this very supreme window manager on all my non-OpenBSD
 systems as well. The version of cwm that I'm working with is from
 yesterday's -current (23rd of July, 2008). The Linux distribution is
 Ubuntu Feisty.
[..]

oga@ and jsg@ pointed me to byacc - thanks! There is some yacc specific
constructs in cwm's parser that bison doesn't support.

To address the mail from [EMAIL PROTECTED]: I think this _is_
OpenBSD related (opposed to Linux related), as there might be other
OpenBSD users, like me, who want to use cwm on their non-OpenBSD boxes
as well, and Linux-only users hardly know about the cwm in OpenBSD.

The following is an attempt to make a simple guide.


OpenBSD's cwm window manager on Ubuntu Linux


1. Install the following packages:

   byacclibxext-dev
   libexpat1-devlibxft-dev
   libfontconfig1-dev   libxrender-dev
   libxau-dev   xlibs-dev
   libxdmcp-dev zlib1g-dev

   You might also need to install cvs and xterm (xterm is the default
   terminal for cwm to start when one types ctrl+alt+enter).

2. Pick an anonymous CVS server close to you:
   http://www.openbsd.org/anoncvs.html#CVSROOT

3. Checkout cwm as of July 24, 2008:

   $ export CVSROOT=(what you picked in step 2)
   $ cvs -q -d$CVSROOT checkout -D 2008-07-24 xenocara/app/cwm
   U xenocara/app/cwm/LICENSE
   U xenocara/app/cwm/Makefile
   [..]
   U xenocara/app/cwm/xmalloc.c
   U xenocara/app/cwm/xutil.c
   $ cd xenocara/app/cwm

4. Patch the source using cwm-linux.patch (attached inline further
   down):

   $ patch  cwm-linux.patch
   patching file calmwm.c
   patching file calmwm.h
   patching file conf.c
   patching file headers.h
   patching file kbfunc.c
   patching file parse.y

5. Generate the parser using byacc:

   $ byacc -d parse.y 
   $ mv y.tab.c parse.c

6. Compile and link:

   $ for i in *.c; do gcc -I /usr/include/freetype2 -c $i; done
   $ gcc -lXft -lXrender -lX11 -lXau -lXdmcp -lXext -lfontconfig -lexpat 
-lfreetype -lz -o cwm *.o

7. Enjoy:

   $ ls -l cwm
   -rwxr-xr-x 1 mt mt 83963 2008-07-24 21:21 cwm


Corrections and flames are most welcome :-)

Martin


cwm-linux.patch:

--- calmwm.c.orig   2008-07-23 15:25:38.0 +0200
+++ calmwm.c2008-07-23 15:25:51.0 +0200
@@ -317,7 +317,7 @@
errno = save_errno;
 }
 
-__dead void
+void
 usage(void)
 {
extern char *__progname;
--- calmwm.h.orig   2008-07-23 15:25:30.0 +0200
+++ calmwm.h2008-07-23 15:25:45.0 +0200
@@ -312,7 +312,7 @@
 voidx_setup(void);
 char   *x_screenname(int);
 voidx_setupscreen(struct screen_ctx *, u_int);
-__dead void usage(void);
+voidusage(void);
 
 struct client_ctx  *client_find(Window);
 voidclient_setup(void);
--- conf.c.orig 2008-07-24 18:20:14.0 +0200
+++ conf.c  2008-07-24 18:37:49.0 +0200
@@ -464,9 +464,9 @@
if (strchr(name, '-') == NULL)
substring = name;
 
-   current_binding-button = strtonum(substring, 1, 3, errstr);
-   if (errstr)
-   warnx(number of buttons is %s: %s, errstr, substring);
+   current_binding-button = strtoll(substring, NULL, 10);
+   if (errno || current_binding-button  1 || current_binding-button  3)
+   warn(invalid number or out of range: %s, substring);
 
conf_mouseunbind(c, current_binding);
 
--- headers.h.orig  2008-07-24 16:52:46.0 +0200
+++ headers.h   2008-07-24 19:08:23.0 +0200
@@ -52,4 +52,8 @@
 
 #include err.h
 
+#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
+#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))
+#define TAILQ_END(head) NULL
+
 #endif /* _CALMWM_HEADERS_H_ */
--- kbfunc.c.orig   2008-07-24 19:04:56.0 +0200
+++ kbfunc.c2008-07-24 19:04:15.0 +0200
@@ -345,7 +345,7 @@
FILE*fp;
char*buf, *lbuf, *p, *home;
char hostbuf[MAXHOSTNAMELEN], filename[MAXPATHLEN];
-   char cmd[256];
+   char cmd[256], buffer[1024];
int  l;
size_t   len;
 
@@ -361,7 +361,9 @@
 
TAILQ_INIT(menuq);
lbuf = NULL;
-   while ((buf = fgetln(fp, len))) {
+   while (!feof(fp)) {
+   buf = fgets(buffer, sizeof(buffer), fp);
+   len = strlen(buf);
if (buf[len - 1] == '\n')
buf[len - 1] = '\0';
else {
--- parse.y.orig2008-07-23 15:44:14.0 +0200
+++ parse.y 2008-07-24 18:31:47.0 +0200
@@ -379,11 +379,9 @@
const char *errstr = NULL;
 
*p = '\0';
-   

Re: Trying to compile cwm on Linux

2008-07-24 Thread Theo de Raadt
+#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
+#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))

That is utterly and completely wrong.  



Re: BIND workaround for older versions?

2008-07-24 Thread Stuart Henderson
On 2008-07-24, Mike Shaw [EMAIL PROTECTED] wrote:
 Regarding the cache poisoning patch (which I see for 4.3).  Are there
 any effective workarounds for OpenBSD 4.0/4.1?

The 4.2 patch should also work for 4.1



Re: Trying to compile cwm on Linux

2008-07-24 Thread Pierre-Yves Ritschard
 6. Compile and link:
 
$ for i in *.c; do gcc -I /usr/include/freetype2 -c $i; done
$ gcc -lXft -lXrender -lX11 -lXau -lXdmcp -lXext -lfontconfig -lexpat 
 -lfreetype -lz -o cwm *.o
 

Most linux distributions carry a pmake package which provides the
a bsd.prog.mk and thus support for the Makefiles distributed with
OpenBSD source code. It can come in handy.



Re: Trying to compile cwm on Linux

2008-07-24 Thread Marc Espie
On Thu, Jul 24, 2008 at 10:01:50PM +0200, Martin Toft wrote:
 +#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
 +#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))

To be a bit more specific than Theo, don't believe idiots like Ulrich
Drepper.

There's a *reason* for strlcpy and strlcat.
strncpy and strncat are bogus. They're almost never the solution.

Accept no substitute.

On any lesser system (and that's mostly linux these days), you must ship
a copy of strlcat and strlcpy.

Fortunately the source code for these is small!

And it's free! 
nice licence! 
no obnoxious GPL!



Re: Trying to compile cwm on Linux

2008-07-24 Thread Martin Toft
On Thu, Jul 24, 2008 at 02:20:22PM -0600, Theo de Raadt wrote:
 +#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
 +#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))
 
 That is utterly and completely wrong.  

Yep, I'm a noob when it comes to these kinds of things. I'll look into
it.



PF

2008-07-24 Thread Craig Kron
Hello,

I recently installed 4.3 (previously using 3.8).

Here's my issue:

My wife is a medical transcriptionist via an SQL server over the internet
(through the openBSD firewall).

With openbsd 3.8 she can do her work just fine.

With 4.3, pf seems to be blocking the SQL server from uploading the document
templates to her computer and doesn't allow the dictation stream in.

Can anyone tell me what changes (other than keep state and flags s/sa) were
made to pf and how to counter-act them? The ruleset I'm using is as follows.


ext_if=em1

int_if=em0

set skip on { lo $int_if }

scrub in

nat on $ext_if from !($ext_if) - ($ext_if:0)

rdr pass on $int_if proto tcp to port ftp - 127.0.0.1 port 8021

block in

pass out keep state

pass quick on $int_if

antispoof quick for { lo $int_if }

pass in on $ext_if proto tcp to ($ext_if) port ssh keep state

pass in inet proto icmp all icmp-type echoreq keep state

pass in on $ext_if proto tcp to ($ext_if) port 8080 keep state



Thank you



Craig



OpenBSD thumbdrives

2008-07-24 Thread Nick Guenther
On Wed, Jul 23, 2008 at 11:22 PM, Nick Holland
[EMAIL PROTECTED] wrote:

 Besides, the finished flash drive is wonderfully useful. :)
 (I've got a 4G, partitioned out as 2G OpenBSD, 2G FAT32, which is
 bootable on OpenBSD and still usable as a Windows flash drive,
 as well.  Only problem I have is I keep buying the super-cheap
 flash drives which work great until you sit on them.)

 (the proper solution is to boot OpenBSD (inc. off a CDROM
 or floppy), partition and format the media, install MBR, install
 kernel, install /boot, install PBR.  If you can do that without
 error, you can probably skip the OpenBSD install script, just
 manually copy files onto your target machine.  i.e., not worth
 the effort, probably.  I know how to do it, and I rarely do so
 without error).


Hey Nick,

Inspired by you (and the realization hey, I've got a 20$ 4gig
thumbdrive now because I'm in the FUTAR), today I set about making
myself one of these. I made a 2gig OpenBSD a partition, and a 2gig FAT
i partition using OpenBSD's newfs_msdos. The trouble is, Windows Vista
doesn't want to recognize it. It sees the partition, of course, but
claims it's unformatted. I set the partition ID in the MBR to 0B
initially, then to 0C, and then to 06 (which is what another flash
drive that vista does recognize has on it) but none of these made
Vista recognize it. I'm assuming the problem is that OpenBSD wrote the
FAT wrong, so I'm wondering how it was that you formatted your drive.
Did you just get windows to do it for you?

-othernick



Re: Trying to compile cwm on Linux

2008-07-24 Thread Miod Vallat
 +#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
 +#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))

strlcpy() and strlcat() return size_t. strncpy() and strncat() return
char *. These #define do not take care of this (among other things).



sftp logging

2008-07-24 Thread Stuart VanZee
I can't seem to get logging for sftp working.

OpenBSD 4.3

Here is the line from my sshd_config

Subsystem   sftp/usr/libexec/sftp-server -f LOCAL7 -l DEBUG

Here is the line from syslog.conf

local7.*/var/log/local7.log

I went as far as rebooting the server to make sure the config
files were read.  Nothing is being written to /var/log/local7.log.
I tried creating a local7.log in case syslog wasn't able to
create it (read that somewhere in my searching for an answer, sounds
hokey to me, but did it anyway) but that didn't help.  Google gave me
a haystack to search through but found confirmation of my config
on a OS X support site but who knows if that is valid for OpenBSD.

If anyone has a cluestick, please hit me with it.

Stuart van Zee
[EMAIL PROTECTED]



Re: BIND workaround for older versions?

2008-07-24 Thread Mike Shaw
Ah...perfect.  Thanks Stuart and Aaron.

-Mike


On Thu, Jul 24, 2008 at 2:57 PM, Aaron Stellman [EMAIL PROTECTED] wrote:
 On Thu, Jul 24, 2008 at 02:48:45PM -0500, Mike Shaw wrote:
 Regarding the cache poisoning patch (which I see for 4.3).  Are there
 any effective workarounds for OpenBSD 4.0/4.1?

 I have a couple older boxes I will be upgrading, but I'd like to CMA
 in the meantime.

 Thanks!
 -Mike

 Perhaps you'd want to look at pf workaround to this. look at misc@
 archives from 2008-07-19.



Re: bioctl output

2008-07-24 Thread John Nietzsche
OpenBSD 4.3-stable (DPE-2900.MP) #4: Thu Jul 24 14:50:29 BRT 2008
[EMAIL PROTECTED]:/usr/src/sys/arch/amd64/compile/DPE-2900.MP
real mem = 3484352512 (3322MB)
avail mem = 3373080576 (3216MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xcfb9c000 (66 entries)
bios0: vendor Dell Inc. version 2.2.6 date 02/05/2008
bios0: Dell Inc. PowerEdge 2900
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC SPCR HPET MCFG WD__ SLIC ERST HEST BERT EINJ
TCPA
acpi0: wakeup devices PCI0(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpi device at acpi0 from table DSDT not configured
acpi device at acpi0 from table FACP not configured
acpimadt0 at acpi0 table APIC addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU E5410 @ 2.33GHz, 2327.85 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,
xTPR,NXE,LONG
cpu0: 6MB 64b/line 16-way L2 cache
cpu0: apic clock running at 332MHz
cpu1 at mainbus0: apid 4 (application processor)
cpu1: Intel(R) Xeon(R) CPU E5410 @ 2.33GHz, 2327.50 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,
xTPR,NXE,LONG
cpu1: 6MB 64b/line 16-way L2 cache
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Xeon(R) CPU E5410 @ 2.33GHz, 2327.50 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,
xTPR,NXE,LONG
cpu2: 6MB 64b/line 16-way L2 cache
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU E5410 @ 2.33GHz, 2327.50 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,
xTPR,NXE,LONG
cpu3: 6MB 64b/line 16-way L2 cache
cpu4 at mainbus0: apid 1 (application processor)
cpu4: Intel(R) Xeon(R) CPU E5410 @ 2.33GHz, 2327.50 MHz
cpu4:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,
xTPR,NXE,LONG
cpu4: 6MB 64b/line 16-way L2 cache
cpu5 at mainbus0: apid 5 (application processor)
cpu5: Intel(R) Xeon(R) CPU E5410 @ 2.33GHz, 2327.50 MHz
cpu5:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,
xTPR,NXE,LONG
cpu5: 6MB 64b/line 16-way L2 cache
cpu6 at mainbus0: apid 3 (application processor)
cpu6: Intel(R) Xeon(R) CPU E5410 @ 2.33GHz, 2327.50 MHz
cpu6:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,
xTPR,NXE,LONG
cpu6: 6MB 64b/line 16-way L2 cache
cpu7 at mainbus0: apid 7 (application processor)
cpu7: Intel(R) Xeon(R) CPU E5410 @ 2.33GHz, 2327.50 MHz
cpu7:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,
xTPR,NXE,LONG
cpu7: 6MB 64b/line 16-way L2 cache
ioapic0 at mainbus0 apid 8 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 8
ioapic1 at mainbus0 apid 9 pa 0xfec8, version 20, 24 pins
ioapic1: misconfigured as apic 0, remapped to apid 9
acpi device at acpi0 from table SPCR not configured
acpihpet0 at acpi0 table HPET: 14318179 Hz
acpi device at acpi0 from table MCFG not configured
acpi device at acpi0 from table WD__ not configured
acpi device at acpi0 from table SLIC not configured
acpi device at acpi0 from table ERST not configured
acpi device at acpi0 from table HEST not configured
acpi device at acpi0 from table BERT not configured
acpi device at acpi0 from table EINJ not configured
acpi device at acpi0 from table TCPA not configured
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 4 (PEX2)
acpiprt2 at acpi0: bus 5 (UPST)
acpiprt3 at acpi0: bus 6 (DWN1)
acpiprt4 at acpi0: bus 8 (DWN2)
acpiprt5 at acpi0: bus 9 (PE2X)
acpiprt6 at acpi0: bus 10 (PEX3)
acpiprt7 at acpi0: bus 11 (PEX4)
acpiprt8 at acpi0: bus 1 (PEX5)
acpiprt9 at acpi0: bus 0 (PE2P)
acpiprt9: no apic found for irq 128
acpiprt9: no apic found for irq 129
acpiprt9: no apic found for irq 142
acpiprt10 at acpi0: bus 12 (PEX6)
acpiprt11 at acpi0: bus 2 (SBEX)
acpiprt12 at acpi0: bus 14 (COMP)
acpicpu0 at acpi0: C3
acpicpu1 at acpi0: C3
acpicpu2 at acpi0: C3
acpicpu3 at acpi0: C3
acpicpu4 at acpi0: C3
acpicpu5 at acpi0: C3
acpicpu6 at acpi0: C3
acpicpu7 at acpi0: C3
ipmi at mainbus0 not configured
cpu0: unknown i686 model 7, can't get bus clockcpu0: EST: unknown
system bus clock
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0 Intel 5000X Host rev 0x12
ppb0 at pci0 dev 2 function 0 Intel 5000 PCIE rev 0x12
pci1 at ppb0 bus 4
ppb1 at 

FFS2

2008-07-24 Thread John Nietzsche
Dear OpenBSD friends,

how may i format a slice with FFS2? and what to put into /etc/fstab

Thanks.



Re: BIND and CNAME-ing

2008-07-24 Thread Parvinder Bhasin
Thanks guys for clearing this up.  So in short you cannot CNAME an  
entire domain (domain.com   IN CNAME google.com  can't do ).


Thanks for the input.  Really appreciate it.

Cheers!
-Parvinder Bhasin

On Jul 24, 2008, at 6:10 AM, Giancarlo Razzolini wrote:


Almir Karic escreveu:

On Wed, Jul 23, 2008 at 01:17:04PM -0700, Parvinder Bhasin wrote:


Hi,

I am stuck at this situation:

Where I have a domain:  abc.com :

I would like to have user who type  http://abc.com (without the www)
redirected to a a different site for example :  www.xyz.com
Redirection for www.abc.com to www.xyz.com works fine.

I have tried CNAME-ing abc.com to www.xyz.com but that wouldn't  
work (I

can see it why).
Is there a way to do this in BIND zone configuration?



with this in my zone i get to google.com when i try to access
test.mydomain.org:

testIN  CNAME   google.com.




This works, yes. But you can't have a CNAME that has the same name as
the zone. It would conflict with the SOA and with the NS entries.
Parvinder will have to use it's scripts to make this work, as he can't
use http redirect.

My regards,

--
Giancarlo Razzolini
http://lock.razzolini.adm.br
Linux User 172199
Red Hat Certified Engineer no:804006389722501
Verify:https://www.redhat.com/certification/rhce/current/
Moleque Sem Conteudo Numero #002
OpenBSD Stable
Ubuntu 8.04 Hardy Heron
4386 2A6F FFD4 4D5F 5842  6EA0 7ABE BBAB 9C0E 6B85




assembler noob question

2008-07-24 Thread Jesus Sanchez

Hi, I'm using 4.2.

I'm trying to learn some about x86 assembly language
for instrucctional purpose. I'm really a noob in this
things so I want to learn from the dumb point.

Every example I've found on the net doesn't works
for me. I only want to make a very very simple runnable
program with only a few practical instrucctions (something
like put the eax register to 0x0) and things like
that, but I don't know how the OpenBSD kernel runs binary code
so everithing the shells returns to me is fu** you noob similar
messages, cause i'm not sending the right flags to ld and as.

There is something critical I need to use to make my binary code
runnable on OpenBSD? I'm trying really simple things like put some
strings in memory and stuff like that, nothing hard to understand, not
even need to have a console text return.

The way I compile:

$ as --gstabs -o object.o source.s
$ ld -s -o program object.o

Thanks for your time.



Re: FFS2

2008-07-24 Thread jmc
--- John Nietzsche [Thu, Jul 24, 2008 at 07:19:11PM -0300]: --- 
 Dear OpenBSD friends,
 
 how may i format a slice with FFS2? and what to put into /etc/fstab

i think you have to be running = 4.2 to have FFS2 support. from
newfs(8):

-O filesystem-format

2Enhanced fast file system (FFS2).


IIRC from some list traffic, you have to be careful what filesystems you
format as FFS2 because the install kernels only have FFS compiled in,
and that could spell upgrade troubles.

you may not need any fstab mods, i haven't experimented yet... sorry i
can't help more.



Re: OpenBSD thumbdrives

2008-07-24 Thread Nick Holland
Nick Guenther wrote:
 On Wed, Jul 23, 2008 at 11:22 PM, Nick Holland
 [EMAIL PROTECTED] wrote:

 Besides, the finished flash drive is wonderfully useful. :)
 (I've got a 4G, partitioned out as 2G OpenBSD, 2G FAT32, which is
 bootable on OpenBSD and still usable as a Windows flash drive,
 as well.  Only problem I have is I keep buying the super-cheap
 flash drives which work great until you sit on them.)

 (the proper solution is to boot OpenBSD (inc. off a CDROM
 or floppy), partition and format the media, install MBR, install
 kernel, install /boot, install PBR.  If you can do that without
 error, you can probably skip the OpenBSD install script, just
 manually copy files onto your target machine.  i.e., not worth
 the effort, probably.  I know how to do it, and I rarely do so
 without error).

 
 Hey Nick,
 
 Inspired by you (and the realization hey, I've got a 20$ 4gig
 thumbdrive now because I'm in the FUTAR), today I set about making
 myself one of these. I made a 2gig OpenBSD a partition, and a 2gig FAT
 i partition using OpenBSD's newfs_msdos. The trouble is, Windows Vista
 doesn't want to recognize it. It sees the partition, of course, but
 claims it's unformatted. I set the partition ID in the MBR to 0B
 initially, then to 0C, and then to 06 (which is what another flash
 drive that vista does recognize has on it) but none of these made
 Vista recognize it. I'm assuming the problem is that OpenBSD wrote the
 FAT wrong, so I'm wondering how it was that you formatted your drive.
 Did you just get windows to do it for you?
 
 -othernick

Actually, it's a bug in windows.  Whodda thunk? :)

The problem is Windows sees a removable device, and it is ready for
multiple partitions...but it only seems to recognize the FIRST
partition as something than it could work with.  So..it tries to make
sense of the OpenBSD partition, fails, and doesn't look past it to
see the Windows partition.

SO, the secret is to put your Windows partition on the flash media
first, then OpenBSD.  You can create the partitions with OpenBSD,
just make sure your Windows partition is before your OpenBSD
partition.  In fact, you probably will find you NEED to create the
partition in OpenBSD, as Windows sees a USB flash drive and makes
assumptions about what you are going to do with it.  Once your
partition exists, however, Windows can format it.  I prefer to
format media with the native OS.

(The observant will note that I've not made it clear if it should
be the first physical partition on the disk, or the first partition
in the partition table.  I'm not sure which it has to be.  Feel free
to experiment, but I've just always made Windows first in both, at
least after the last time it bit me, when I was 100+km from home
dropping off some systems for a friend of mine that I *thought* were
sufficiently tested...and without the stuff needed to rebuild the
flash media properly.  That makes it so much easier to remember :).

When done, Windows will see one partition, and it will be usable.

Note: this isn't just USB thumbdrives, it is also CF flash media in
a USB adapter.  Not sure about USB HD (no idea) or CF in an IDE
adapter (I'm guessing it would be ok with that).

Just don't sit on that $20 thumb drive, at least, unless you can
resolder the joints between the USB plug and the circuit board. :)

Nick.



Re: assembler noob question

2008-07-24 Thread Philip Guenther
On Thu, Jul 24, 2008 at 5:55 PM, Jesus Sanchez [EMAIL PROTECTED] wrote:
 I'm trying to learn some about x86 assembly language
 for instrucctional purpose. I'm really a noob in this
 things so I want to learn from the dumb point.

Perhaps you should bite off the task in smaller chunks.  There are a
bunch of things involved in process startup that you don't really need
to understand initially, much less work out from scratch when you're
still learning the instruction set.  Most people learn to swim in the
shallow end of swimming pools, instead of while trying to cross a
large river.


 Every example I've found on the net doesn't works
 for me. I only want to make a very very simple runnable
 program with only a few practical instrucctions (something
 like put the eax register to 0x0) and things like
 that, but I don't know how the OpenBSD kernel runs binary code
 so everithing the shells returns to me is fu** you noob similar
 messages, cause i'm not sending the right flags to ld and as.

It's not clear (to me) what your goal is.

If you're just trying to learn the x86 instruction set, then why not
put your code in an __asm__() block inside a C program?  That lets the
compiler do all the heavy lifting.

If you're trying to understand process startup, then you should start
by reading the output of gcc -S, and maybe the ELF specification,
depending on what you're trying to learn.  Only after staring at that
should you start writing stuff.

As for invoking as and ld, how about taking a look at what gcc
passes to as and ld when it invokes them when compiling a C
program?  'gcc' will show that when invoked with the -v option.


 There is something critical I need to use to make my binary code
 runnable on OpenBSD? I'm trying really simple things like put some
 strings in memory and stuff like that, nothing hard to understand, not
 even need to have a console text return.

 The way I compile:

 $ as --gstabs -o object.o source.s
 $ ld -s -o program object.o

It's not just how you invoke 'as' and 'ld' but also what you put in
the assembly code.  For example, you need to include assembly
directives that tell 'as' that your code belongs in the text segment,
otherwise it won't be marked as executable when loaded into memory.


Philip Guenther



mplayer, DVD's and dvd drive's digital out line

2008-07-24 Thread Chris Bennett

I have just set a a different computer with 4.4
Mplayer works right out of the box except audio fails for some dvd's

My question is:
Is the small two wire digital output on the drive the same as the coax 
input that my stereo uses to decode PCM and 5.1 sound from a regular 
cable box or DVD player?
Could I just make an adapter from this line to an RCA plug and just 
connect this directly to my stereo receiver and forget about even caring 
whether sound drivers work or not?


Chris Bennett



Re: assembler noob question

2008-07-24 Thread Jesus Sanchez

Philip Guenther escribis:

On Thu, Jul 24, 2008 at 5:55 PM, Jesus Sanchez [EMAIL PROTECTED] wrote:
  

I'm trying to learn some about x86 assembly language
for instrucctional purpose. I'm really a noob in this
things so I want to learn from the dumb point.



Perhaps you should bite off the task in smaller chunks.  There are a
bunch of things involved in process startup that you don't really need
to understand initially, much less work out from scratch when you're
still learning the instruction set.  Most people learn to swim in the
shallow end of swimming pools, instead of while trying to cross a
large river.
  

I would like to learn x86 assembly from the point of view of PCspim
(Xspim on *nix)
to the MIPS arch. Not to make usefull things, just to understand the
machine,
with spim (an emulator) you have a view of the registers, a debugger and
a very
very close point of view of what the machine is doing. I would like to
do something
similar with mi i386 machine, 'as' and 'ld'.


  

Every example I've found on the net doesn't works
for me. I only want to make a very very simple runnable
program with only a few practical instrucctions (something
like put the eax register to 0x0) and things like
that, but I don't know how the OpenBSD kernel runs binary code
so everithing the shells returns to me is fu** you noob similar
messages, cause i'm not sending the right flags to ld and as.



It's not clear (to me) what your goal is.

If you're just trying to learn the x86 instruction set, then why not
put your code in an __asm__() block inside a C program?  That lets the
compiler do all the heavy lifting.
  

I'm trying to do things without gcc at all. Just as (or nasm) and ld, so
inline
assembly isn't nice for me, only as last option to learn.

If you're trying to understand process startup, then you should start
by reading the output of gcc -S, and maybe the ELF specification,
depending on what you're trying to learn.  Only after staring at that
should you start writing stuff.

As for invoking as and ld, how about taking a look at what gcc
passes to as and ld when it invokes them when compiling a C
program?  'gcc' will show that when invoked with the -v option.
  

the ouput files of gcc -S are great, but still very complicated to me, I
want
to learn from a lower point. The ELF specification will be the next read.
On the gcc -v output, I saw a thing called collect2 that I really
don't know
what does, I will research about it.


  

There is something critical I need to use to make my binary code
runnable on OpenBSD? I'm trying really simple things like put some
strings in memory and stuff like that, nothing hard to understand, not
even need to have a console text return.

The way I compile:

$ as --gstabs -o object.o source.s
$ ld -s -o program object.o



It's not just how you invoke 'as' and 'ld' but also what you put in
the assembly code.  For example, you need to include assembly
directives that tell 'as' that your code belongs in the text segment,
otherwise it won't be marked as executable when loaded into memory.
  

maybe that's the problem, my binary files aren't marked as runnable to
the shells.
After some basic research, 'objdump -s' seems to be a very nice tool for me.
I will try to apply some simple math algorithms to assembler code.

Thanks for your time.


Philip Guenther




Re: mplayer, DVD's and dvd drive's digital out line

2008-07-24 Thread Ted Unangst
On 7/24/08, Chris Bennett [EMAIL PROTECTED] wrote:
 I have just set a a different computer with 4.4
  Mplayer works right out of the box except audio fails for some dvd's

  My question is:
  Is the small two wire digital output on the drive the same as the coax
 input that my stereo uses to decode PCM and 5.1 sound from a regular cable
 box or DVD player?

No, it's more likely the same as the line out on a cd player.  Tell
mplayer to pick the right audio track, instead of the one it can't
decode.