Votre formation DIF à partir de 0
DIF A PARTIR DE 0 CHEZ RIFC InformatiqueChaque annie chaque salarii ` droit ` 20h de DIF (Droit Individuel de Formation). Si vous n'utilisez pas ce quotat de formation pendant que vous jtes chez votre employeur, ce quotat est remis ` ziro et vous perdez tout. Ce quotat d'heure ne peut pas excider 120H, arrivi ` ce quotat toutes les annies de travail suivant ne vous apporte plus d'heure. Pensez ` l'utiliser rigulihrement. Nous sommes un centre de formation agrii implanti ` Pantin, mais nous dilivrons des formations dans toute l'ile de France Utilisez le pour vous amiliorer en Bureautique (Word, Excel, Powerpoint, Open Office,...) en Base de donnies (Access, Oracle, MySQL..) en Multimidia (Indesin Photoshop, Gimp...) en Diveloppement Web (HTML, CSS, PHP, MySQL, Dreamweaver...) en suivant une formation chez nous. Tarif ` partir de 0. Contactez nous pour en savoir plus Par mail : formati...@rifc-info.com ( mailto:formati...@rifc-info.com?subject=demande d'informationsbody=Monsieur, ) Par tiliphone : +33(0)1 79 04 24 17 N'hisitez pas ` consulter notre catalogue en cliquant ici ( http://www.formations-bureautique.net/pdf/catalogue.pdf; ) Veuillez cliquez ici ( mailto:desinscript...@rifc-info.com; ) pour vous disabonner R.I.F.C - Association loi 1901 - 26 avenue Anatole France - 93500 Pantin - France - Site Internet: http://www.formations-bureautique.net - N0 de SIRET : 452 883 937 00016 - code NAF : 6201Z - N0 de TVA : FR80452883937 - N0 centre de formation agrii : 11930525493
Re: ACPI so close I can almost taste it...
On Fri, Apr 09, 2010 at 03:44:54PM -0400, STeve Andre' wrote: On Friday 09 April 2010 03:37:17 Josh Rickmar wrote: On Thu, Apr 08, 2010 at 08:53:12PM -0400, STeve Andre' wrote: Willing to be a test case for other ideas! Same here, I have a T500 and just upgraded to the latest -current to test out the new suspend and resume. My dmesg: Interesting, so you can at least partly reactivate, which I cannot. What do you do to suspend? --STeve Andre' zzz
problems with carp based firewall - all connections are suspended after falling back from failover
Hello, I've setup a openbsd-ha firewall, based on the http://www.openbsd.org/faq/pf/carp.html. If the master goes down - the backup system become the Master rule. All established connections are in sync and stay active - so thats perfect. But if the original Master system comes back again and fall back to the Master state - all established connections are broken, maybe they not successfully synced to the old master? Is there a way to prevent fallback, so the backup system stay in Master rule after failover? Maybe also I've a wrong setup. Primary setup: /etc/hostname.carp0: inet 10.1.1.1 255.255.255.0 10.100.255.255 vhid 1 pass bbb /etc/hostname.carp1: inet 10.1.2.1 255.255.255.0 10.68.255.255 vhid 2 pass aaa /etc/hostname.carp2: inet 10.1.3.1 255.255.255.0 10.101.10.255 vhid 3 pass xxx /etc/hostname.pfsync0 up syncdev em1 net.inet.carp.preempt=1 net.inet.ip.forwarding=1 net.inet.carp.log=7 pf.conf # allow pfsync pass quick on em1 proto pfsync # allow carp pass quick on { em0, em2, em3 } proto carp keep state Standby setup: /etc/hostname.carp0: inet 10.1.1.1 255.255.255.0 10.100.255.255 vhid 1 advskew 100 pass bbb /etc/hostname.carp1: inet 10.1.2.1 255.255.255.0 10.68.255.255 vhid 2 advskew 100 pass aaa /etc/hostname.carp2: inet 10.1.3.1 255.255.255.0 10.101.10.255 vhid 3 advskew 100 pass xxx /etc/hostname.pfsync0 up syncdev em1 net.inet.carp.preempt=1 net.inet.ip.forwarding=1 net.inet.carp.log=7 pf.conf # allow pfsync pass quick on em1 proto pfsync # allow carp pass quick on { em0, em2, em3 } proto carp keep state A failover and fallback gives me the follow entrys in the message log: the master goes down: Apr 9 16:02:05 fw-bkp /bsd: carp1: state transition: BACKUP - MASTER Apr 9 16:02:05 fw-bkp /bsd: carp0: state transition: BACKUP - MASTER Apr 9 16:02:05 fw-bkp /bsd: carp2: state transition: BACKUP - MASTER the master comes back: Apr 9 16:25:07 fw-bkp /bsd: carp0: state transition: MASTER - BACKUP Apr 9 16:25:07 fw-bkp /bsd: carp2: state transition: MASTER - BACKUP Apr 9 16:25:17 fw-bkp /bsd: carp1: state transition: MASTER - BACKUP the primary booting up and takeover the master rule: Apr 9 16:24:11 fw-pri /bsd: carp: carp0 demoted group carp to 129 Apr 9 16:24:11 fw-pri /bsd: carp: carp1 demoted group carp to 130 Apr 9 16:24:11 fw-pri /bsd: carp: carp2 demoted group carp to 131 Apr 9 16:24:11 fw-pri /bsd: carp0: state transition: INIT - BACKUP Apr 9 16:24:11 fw-pri /bsd: carp: carp0 demoted group carp to 134 Apr 9 16:24:12 fw-pri /bsd: carp: pfsync0 demoted group carp to 131 Apr 9 16:24:12 fw-pri /bsd: carp: pfsync0 demoted group pfsync to 1 Apr 9 16:24:12 fw-pri /bsd: carp1: state transition: INIT - BACKUP Apr 9 16:24:12 fw-pri /bsd: carp: carp1 demoted group carp to 130 Apr 9 16:24:12 fw-pri /bsd: carp2: state transition: INIT - BACKUP Apr 9 16:24:12 fw-pri /bsd: carp: carp2 demoted group carp to 129 Apr 9 16:24:12 fw-pri /bsd: carp1: state transition: BACKUP - MASTER Apr 9 16:24:29 fw-pri /bsd: carp: pfsync0 demoted group carp to 0 Apr 9 16:24:29 fw-pri /bsd: carp: pfsync0 demoted group pfsync to 0 Apr 9 16:24:30 fw-pri /bsd: carp0: state transition: BACKUP - MASTER Apr 9 16:24:30 fw-pri /bsd: carp2: state transition: BACKUP - MASTER hopefully you can help me. Regards, Tom
Re: problems with carp based firewall - all connections are suspended after falling back from failover
On Sat, Apr 10, 2010 at 9:44 AM, tom baecker tb4...@googlemail.com wrote: Hello, I've setup a openbsd-ha firewall, based on the http://www.openbsd.org/faq/pf/carp.html. If the master goes down - the backup system become the Master rule. All established connections are in sync and stay active - so thats perfect. But if the original Master system comes back again and fall back to the Master state - all established connections are broken, maybe they not successfully synced to the old master? Is there a way to prevent fallback, so the backup system stay in Master rule after failover? Maybe also I've a wrong setup. Primary setup: /etc/hostname.carp0: inet 10.1.1.1 255.255.255.0 10.100.255.255 vhid 1 pass bbb /etc/hostname.carp1: inet 10.1.2.1 255.255.255.0 10.68.255.255 vhid 2 pass aaa /etc/hostname.carp2: inet 10.1.3.1 255.255.255.0 10.101.10.255 vhid 3 pass xxx /etc/hostname.pfsync0 up syncdev em1 net.inet.carp.preempt=1 net.inet.ip.forwarding=1 net.inet.carp.log=7 pf.conf # allow pfsync pass quick on em1 proto pfsync # allow carp pass quick on { em0, em2, em3 } proto carp keep state Standby setup: /etc/hostname.carp0: inet 10.1.1.1 255.255.255.0 10.100.255.255 vhid 1 advskew 100 pass bbb /etc/hostname.carp1: inet 10.1.2.1 255.255.255.0 10.68.255.255 vhid 2 advskew 100 pass aaa /etc/hostname.carp2: inet 10.1.3.1 255.255.255.0 10.101.10.255 vhid 3 advskew 100 pass xxx /etc/hostname.pfsync0 up syncdev em1 net.inet.carp.preempt=1 net.inet.ip.forwarding=1 net.inet.carp.log=7 pf.conf # allow pfsync pass quick on em1 proto pfsync # allow carp pass quick on { em0, em2, em3 } proto carp keep state A failover and fallback gives me the follow entrys in the message log: the master goes down: Apr 9 16:02:05 fw-bkp /bsd: carp1: state transition: BACKUP - MASTER Apr 9 16:02:05 fw-bkp /bsd: carp0: state transition: BACKUP - MASTER Apr 9 16:02:05 fw-bkp /bsd: carp2: state transition: BACKUP - MASTER the master comes back: Apr 9 16:25:07 fw-bkp /bsd: carp0: state transition: MASTER - BACKUP Apr 9 16:25:07 fw-bkp /bsd: carp2: state transition: MASTER - BACKUP Apr 9 16:25:17 fw-bkp /bsd: carp1: state transition: MASTER - BACKUP the primary booting up and takeover the master rule: Apr 9 16:24:11 fw-pri /bsd: carp: carp0 demoted group carp to 129 Apr 9 16:24:11 fw-pri /bsd: carp: carp1 demoted group carp to 130 Apr 9 16:24:11 fw-pri /bsd: carp: carp2 demoted group carp to 131 Apr 9 16:24:11 fw-pri /bsd: carp0: state transition: INIT - BACKUP Apr 9 16:24:11 fw-pri /bsd: carp: carp0 demoted group carp to 134 Apr 9 16:24:12 fw-pri /bsd: carp: pfsync0 demoted group carp to 131 Apr 9 16:24:12 fw-pri /bsd: carp: pfsync0 demoted group pfsync to 1 Apr 9 16:24:12 fw-pri /bsd: carp1: state transition: INIT - BACKUP Apr 9 16:24:12 fw-pri /bsd: carp: carp1 demoted group carp to 130 Apr 9 16:24:12 fw-pri /bsd: carp2: state transition: INIT - BACKUP Apr 9 16:24:12 fw-pri /bsd: carp: carp2 demoted group carp to 129 Apr 9 16:24:12 fw-pri /bsd: carp1: state transition: BACKUP - MASTER Apr 9 16:24:29 fw-pri /bsd: carp: pfsync0 demoted group carp to 0 Apr 9 16:24:29 fw-pri /bsd: carp: pfsync0 demoted group pfsync to 0 Apr 9 16:24:30 fw-pri /bsd: carp0: state transition: BACKUP - MASTER Apr 9 16:24:30 fw-pri /bsd: carp2: state transition: BACKUP - MASTER hopefully you can help me. Regards, Tom net.inet.carp.preempt Allow virtual hosts to preempt each other. Set it to 0 and give it a try. /Tony
Re: Howto Create a Auto-Extract Package with Shell Script tar ?
Hello, On Sat, 10.04.2010 at 09:17:53 +0800, Aaron Lewis aaron.lewis1...@gmail.com wrote: Firstly i need to compress my fonts to a Font_Name.tar.bz2 , if i want to put the extract script and Font_Name.tar.bz2 together , a single bundle , howto archive it ? Right now , i tried to append the Archive to the script file , Then try to read through the `setup file' except for the first 5 lines. maybe you can use or tweak 'shar' to do what you want. $ man shar Kind regards, --Toni++
Re: problems with carp based firewall - all connections are suspended after falling back from failover
net.inet.carp.preempt Allow virtual hosts to preempt each other. Set it to 0 and give it a try. I try it, and after the primary comes up again - the established connections stay active - great! But 1 of 3 carp interfaces dont fall back to the Master mode at the Primary: carp: BACKUP carpdev em0 vhid 1 advbase 1 advskew 0 carp: MASTER carpdev em2 vhid 2 advbase 1 advskew 0 carp: MASTER carpdev em3 vhid 3 advbase 1 advskew 0 Does it takes some time, or do I have to do something manualy? Regards, Tom
Re: Howto Create a Auto-Extract Package with Shell Script tar ?
On 4/9/10 9:17 PM, Aaron Lewis wrote: Hi, I'm trying to make a small binary package , which aims to install some X11 fonts to /usr/share/fonts/truetype. Creating such a binary package will allow me to port it on any UNIX/Linux system , very useful. Firstly i need to compress my fonts to a Font_Name.tar.bz2 , if i want to put the extract script and Font_Name.tar.bz2 together , a single bundle , howto archive it ? Right now , i tried to append the Archive to the script file , Then try to read through the `setup file' except for the first 5 lines. #!/bin/bash tail +5 $0 | tar xvf - -C /tmp exit 0 # //Append Tar.Bz2 file Doesn't looks like a good way indeed. In this case, your shell script relies on the destination machine already having the utilities needed to decompress the files. From the man page of tar(1): -jCompress archive using bzip2. The bzip2 utility must be in- stalled separately. In the case of OpenBSD, bzip2 is not installed by default. So if the interest here is portability, you are not going down the right path. I would suggest something else, like gzip. Again from the man page of tar: -zCompress archive using gzip(1). Creating such a package will *not* allow you to port it to any UNIX/Linux system for 2 reasons (that I can think of). 1) bzip2 might not be present. 2) I could be wrong (having never needed to install fonts from their vendors), but I'd be willing to bet that fonts don't go in the same place on every system. If you are really only trying to distribute a package of fonts, you're better off just distributing it as is, and telling people where to extract it on a given system. If you look at most bundles of files in unix, they are .tar.gz or .tgz. If everybody does it, there must be a reason for it. Simpler is always better.
Re: problems with carp based firewall - all connections are suspended after falling back from failover
On Sat, Apr 10, 2010 at 11:10:42AM +0200, tom baecker wrote: net.inet.carp.preempt Allow virtual hosts to preempt each other. Set it to 0 and give it a try. I try it, and after the primary comes up again - the established connections stay active - great! But 1 of 3 carp interfaces dont fall back to the Master mode at the Primary: carp: BACKUP carpdev em0 vhid 1 advbase 1 advskew 0 carp: MASTER carpdev em2 vhid 2 advbase 1 advskew 0 carp: MASTER carpdev em3 vhid 3 advbase 1 advskew 0 Does it takes some time, or do I have to do something manualy? Regards, Tom This can happen if the list of addresses, netmasks vhid and password of an carp interface is not exactly the same on the two hosts. -Otto
Re: problems with carp based firewall - all connections are suspended after falling back from failover
This can happen if the list of addresses, netmasks vhid and password of an carp interface is not exactly the same on the two hosts. -Otto I'm confused, because if I reboot in this case the Secondary, all carp interfaces swiched to Master state on primary, without any packet loss. I double checked my setup, but I didnt find a mistake. Primary: /etc/hostname.carp0:inet 10.1.1.1 255.255.255.0 10.1.1.255 vhid 1 pass aaa /etc/hostname.carp1:inet 10.1.2.1 255.255.255.0 10.1.2.255 vhid 2 pass bbb /etc/hostname.carp2:inet 10.1.3.1 255.255.255.0 10.1.3.255 vhid 3 pass ccc /etc/hostname.em0:inet 10.1.1.2 255.255.255.0 NONE /etc/hostname.em1:inet 192.168.199.1 255.255.255.0 NONE /etc/hostname.em2:inet 10.1.2.2 255.255.255.0 NONE /etc/hostname.em3:inet 10.1.3.2 255.255.255.0 NONE /etc/hostname.pfsync0:up syncdev em1 Secondary: /etc/hostname.carp0:inet 10.1.1.1 255.255.255.0 10.1.1.255 vhid 1 advskew 100 pass aaa /etc/hostname.carp1:inet 10.1.2.1 255.255.255.0 10.1.2.255 vhid 2 advskew 100 pass bbb /etc/hostname.carp2:inet 10.1.3.1 255.255.255.0 10.1.3.255 vhid 3 advskew 100 pass ccc /etc/hostname.em0:inet 10.1.1.3 255.255.255.0 NONE /etc/hostname.em1:inet 192.168.199.2 255.255.255.0 NONE /etc/hostname.em2:inet 10.1.2.3 255.255.255.0 NONE /etc/hostname.em3:inet 10.1.3.3 255.255.255.0 NONE /etc/hostname.pfsync0:up syncdev em1 Regards, Tom
Re: Howto Create a Auto-Extract Package with Shell Script tar ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/10/2010 05:22 PM, Jean-Philippe Ouellet wrote: If you are really only trying to distribute a package of fonts, you're better off just distributing it as is, and telling people where to extract it on a given system. If you look at most bundles of files in unix, they are .tar.gz or .tgz. If everybody does it, there must be a reason for it. Simpler is always better. Thanks for your experience ! There should be a reason why people prefer gzip other than bzip2 , i'd try to put them all in tgz. - -- Best Regards, Aaron Lewis - PGP: 0x4A6D32A0 FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0 irc: A4r0n on freenode Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvAUecACgkQvf41sEptMqAB6ACgg6hDSKWJm/hLeDEOWTl+DfsY MQEAoK8dr/kDOVrtxYhGhRYrYSLX66+l =1V+g -END PGP SIGNATURE-
Re: Howto Create a Auto-Extract Package with Shell Script tar ?
On 2010-04-10, Aaron Lewis aaron.lewis1...@gmail.com wrote: Hi, I'm trying to make a small binary package , which aims to install some X11 fonts to /usr/share/fonts/truetype. /usr/share/fonts/truetype - not portable Creating such a binary package will allow me to port it on any UNIX/Linux system , very useful. Firstly i need to compress my fonts to a Font_Name.tar.bz2 , if i want to put the extract script and Font_Name.tar.bz2 together , a single bundle , howto archive it ? Right now , i tried to append the Archive to the script file , Then try to read through the `setup file' except for the first 5 lines. #!/bin/bash /bin/bash - not portable tail +5 $0 | tar xvf - -C /tmp exit 0 # //Append Tar.Bz2 file bz2 - not as portable as it could be relying on tar to autodetect compressed archives - not portable running some random downloaded shell archive with sufficient permissions to install to /usr/share without a good way to inspect what it's going to overwrite - not safe Doesn't looks like a good way , anyone could help ? the simple portable safe way is a tar.gz with a README and ideally a Makefile. people know how to use these. use a variable for the install target so people can override it on the make(1) command line.
[SOLVED] Re: Howto Create a Auto-Extract Package with Shell Script tar ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/10/2010 04:56 PM, Toni Mueller wrote: Hello, On Sat, 10.04.2010 at 09:17:53 +0800, Aaron Lewis aaron.lewis1...@gmail.com wrote: Firstly i need to compress my fonts to a Font_Name.tar.bz2 , if i want to put the extract script and Font_Name.tar.bz2 together , a single bundle , howto archive it ? Right now , i tried to append the Archive to the script file , Then try to read through the `setup file' except for the first 5 lines. maybe you can use or tweak 'shar' to do what you want. $ man shar Yeah , that's what i'm looking for , thanks ! Encoding to readable characters , and easy to hack it ;-) Kind regards, --Toni++ - -- Best Regards, Aaron Lewis - PGP: 0x4A6D32A0 FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0 irc: A4r0n on freenode Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvAUlEACgkQvf41sEptMqAJ9QCgwCMRNz+T9RGarMnit4ybnW9C yUAAniDQAZQ5vpWBHJsGsR2TKR44GINc =Z8aB -END PGP SIGNATURE-
[SOLVED] Re: Howto Create a Auto-Extract Package with Shell Script tar ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/10/2010 06:25 PM, Stuart Henderson wrote: On 2010-04-10, Aaron Lewis aaron.lewis1...@gmail.com wrote: Hi, I'm trying to make a small binary package , which aims to install some X11 fonts to /usr/share/fonts/truetype. /usr/share/fonts/truetype - not portable Creating such a binary package will allow me to port it on any UNIX/Linux system , very useful. Firstly i need to compress my fonts to a Font_Name.tar.bz2 , if i want to put the extract script and Font_Name.tar.bz2 together , a single bundle , howto archive it ? Right now , i tried to append the Archive to the script file , Then try to read through the `setup file' except for the first 5 lines. #!/bin/bash /bin/bash - not portable Oops , my linux background .. you're right Stuart. tail +5 $0 | tar xvf - -C /tmp exit 0 # //Append Tar.Bz2 file bz2 - not as portable as it could be relying on tar to autodetect compressed archives - not portable running some random downloaded shell archive with sufficient permissions to install to /usr/share without a good way to inspect what it's going to overwrite - not safe Doesn't looks like a good way , anyone could help ? the simple portable safe way is a tar.gz with a README and ideally a Makefile. people know how to use these. use a variable for the install target so people can override it on the make(1) command line. Makefile + ReadMe is yet another good way. Put different entries based on different OS , and people just override Makefile command line. I've similar things before e.g make openbsd make solaris make linux .. Simpler is easier anyway ;-) Thanks to all of you. - -- Best Regards, Aaron Lewis - PGP: 0x4A6D32A0 FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0 irc: A4r0n on freenode Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvAVdYACgkQvf41sEptMqD36gCg2PYIlMjNBwhx6zS2rblyEyoJ LXgAoJDKuYwXKLoJ5Vj+D69DJ2aROJv5 =LWAY -END PGP SIGNATURE-
Execute startup script as user
Hello. I'm running a headless OpenBSD server. I'm trying to create a startup script that executes the transmission-daemon as a regular user. Details: located in /etc/transmission/rc.transmission permissions -rw-r- 1 root wheel 390 Jul 13 18:30 rc.transmission Script follows: ---script start #! /bin/sh #Provides transmission-daemon # --- Configuration --- USERNAME=username PASSWD=password # --- End configuration --- DESC=bittorrent client NAME=transmission-daemon DAEMON=$(which $NAME) CONFIGDIR=/home/$USERNAME/.config/$NAME #Start daemon /usr/bin/sudo -u $USERNAME -p $PASSWD $DAEMON -g $CONFIGDIR --script end- The following is appended to /etc/rc.conf -- transmission=YES -- the following is appended to /etc/rc.local -- if [ -f /etc/transmission/rc.transmission]; then if [ X${transmission} = XYES -a -x /usr/local/bin/transmission-daemon ]; then echo -n ' transmission-daemon'; . /etc/transmission/rc.transmission fi fi -- The rc.transmission script runs fine when executed under root, but it isn't executed during boot. Have been roaming around for tips but since i haven't figured out how OpenBSD executes startup scripts with other owners than root i'm out of ideas. Hope somebody can give me pointers to what's wrong. --- Regards, Mats
Re: Attaching to a USB keyboard
On 09-04-2010 15:06, Stuart Henderson wrote: On 2010-04-09, Jens Teglhus M?llerj...@mostlyharmless.dk wrote: Is it possible for a process to consume all output for a (this) particular keyboard I don't know about that.. What i was fishing for was if it is possible in a simple way (like having a process read from /dev/ukbd* or something similar) that would consume the data and not have it output on the terminal. or do i have to force it into ugen (is that even possible) and you already know how to force it into ugen, same thing you did for the Velleman kit :) Yeah at the time of writing i was just a little unsure if ubkd was a uhid device and therefore could be forced into ugen with a quirk, but when i look at the man page i can see that ukbd attaches at uhiddev. I'm not sure if that would make sense to commit this one though, as presumably some people will want the device to present keyboard input.. No, i can see that perhaps i will need to keep a local diff to do that try to read the output myself? I would look around and see if someone already has code for this using libusb (which is fairly portable)... But wouldn't i still need some way of telling the kernel not to attach the device? Like a quirk or disabling it via ukc like chriss bennet suggested (and config -e for a more permanent solution). Or can libusb tell the kernel to no longer handle the device? I don't have the dmesg/attach info at hand, but will post it later if required. Best regards Jens
Re: [SOLVED] Re: Howto Create a Auto-Extract Package with Shell Script tar ?
On 2010/04/10 18:41, Aaron Lewis wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/10/2010 06:25 PM, Stuart Henderson wrote: On 2010-04-10, Aaron Lewis aaron.lewis1...@gmail.com wrote: Hi, I'm trying to make a small binary package , which aims to install some X11 fonts to /usr/share/fonts/truetype. /usr/share/fonts/truetype - not portable Creating such a binary package will allow me to port it on any UNIX/Linux system , very useful. Firstly i need to compress my fonts to a Font_Name.tar.bz2 , if i want to put the extract script and Font_Name.tar.bz2 together , a single bundle , howto archive it ? Right now , i tried to append the Archive to the script file , Then try to read through the `setup file' except for the first 5 lines. #!/bin/bash /bin/bash - not portable Oops , my linux background .. you're right Stuart. tail +5 $0 | tar xvf - -C /tmp exit 0 # //Append Tar.Bz2 file bz2 - not as portable as it could be relying on tar to autodetect compressed archives - not portable running some random downloaded shell archive with sufficient permissions to install to /usr/share without a good way to inspect what it's going to overwrite - not safe Doesn't looks like a good way , anyone could help ? the simple portable safe way is a tar.gz with a README and ideally a Makefile. people know how to use these. use a variable for the install target so people can override it on the make(1) command line. Makefile + ReadMe is yet another good way. Put different entries based on different OS , and people just override Makefile command line. I've similar things before e.g make openbsd make solaris make linux .. the only thing you probably want to change is the directory, so something like make INSTALLDIR=/usr/share/foo/bar and you can put a default definition for INSTALLDIR in the Makefile
Re: [SOLVED] Re: Howto Create a Auto-Extract Package with Shell Script tar ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 the only thing you probably want to change is the directory, so something like make INSTALLDIR=/usr/share/foo/bar and you can put a default definition for INSTALLDIR in the Makefile Yeah , right , modify such a macro is yet another good way ;-) I'd put them in , too. Thanks. - -- Best Regards, Aaron Lewis - PGP: 0x4A6D32A0 FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0 irc: A4r0n on freenode Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvAXnAACgkQvf41sEptMqAEiQCggEy8NMKnPyRNKXgoVyuIxG+a bmoAn3pCeZ0NJjZZYbts5TORTAEVwu8Q =gnUw -END PGP SIGNATURE-
Re: Execute startup script as user
On Sat, Apr 10, 2010 at 12:38:25PM +0200, Mats-Gxran Karlsen wrote: -rw-r- 1 root wheel 390 Jul 13 18:30 rc.transmission it's not executable The following is appended to /etc/rc.conf use rc.conf.local
Livros Usados, Raros e Esgotados
Caso nco consiga visualizar este e-mail, clique no link abaixo: http://www.sebosonline.com/news/email.aspx?NewsID=9 [IMAGE] Destaques Trjs Pegas de Martins Pena LIVRO: Trjs Pegas de Martins Pena por: R$ 4,90 Macunamma LIVRO: Macunamma por: R$ 10,00 Lucmola LIVRO: Lucmola por: R$ 10,00 Mensagens Vivas LIVRO: Mensagens Vivas por: R$ 10,00 A Safadinha-colegco Arte-erstica N: 5 LIVRO: A Safadinha-colegco Arte-erstica N: 5 por: R$ 25,00 Voce Pode Curar sua Vida LIVRO: Voce Pode Curar sua Vida por: R$ 19,00 SCIENTIFIC AMERICAN BRASIL - CIJNCIA NA COZINHA N: 003 REVISTA: SCIENTIFIC AMERICAN BRASIL - CIJNCIA NA COZINHA N: 003 por: R$ 7,00 Cces de Aluguel - Edigco de colecionador -Quentin Tarantino DVD: Cces de Aluguel - Edigco de colecionador -Quentin Tarantino por: R$ 16,00 O Hobbit LIVRO: O Hobbit por: R$ 15,00 Turma da Mtnica Jovem N: 1 - (Eles Cresceram) GIBI: Turma da Mtnica Jovem N: 1 - (Eles Cresceram) de: R$ 20,00 por: R$ 16,00 Turma da Mtnica Jovem N: 2 + N: 0 - (a Aventura Continua) GIBI: Turma da Mtnica Jovem N: 2 + N: 0 - (a Aventura Continua) de: R$ 55,00 por: R$ 50,00 O Escaravelho do Diabo LIVRO: O Escaravelho do Diabo por: R$ 5,00 SCIENTIFIC AMERICAN BRASIL - CIJNCIA NA COZINHA N: 002 REVISTA: SCIENTIFIC AMERICAN BRASIL - CIJNCIA NA COZINHA N: 002 Indisponmvel Scarlett volume unico LIVRO: Scarlett volume unico por: R$ 20,00 Turma da Mtnica Jovem N: 3 + N: 0 - (Novos Desafios) GIBI: Turma da Mtnica Jovem N: 3 + N: 0 - (Novos Desafios) de: R$ 55,00 por: R$ 50,00 Turma da Mtnica Jovem N: 6 + N: 0 - (O Brilho de Um Pulsar) GIBI: Turma da Mtnica Jovem N: 6 + N: 0 - (O Brilho de Um Pulsar) de: R$ 55,00 por: R$ 50,00 [IMAGE] O Sebos Online respeita a sua privacidade e i contra o spam na rede. Esperamos que vocj tenha apreciado esta mensagem. Se vocj nco deseja mais receber e-mails da empresa, clique aqui.
is skype using encryption?
Can someone [same subnet, e.g.: with a hub, not switch..] sniff my skype password when i'm using Skype? Is it encrypted? Thank you for the info
Re: Daily digest, Issue 1772 (32 messages)
Mats, 2010/4/10 matsg...@gmail.com: -- Forwarded message -- From: Mats-Gxran Karlsen matsg...@gmail.com To: misc@openbsd.org Date: Sat, 10 Apr 2010 12:38:25 +0200 Subject: Execute startup script as user Hello. I'm running a headless OpenBSD server. I'm trying to create a startup script that executes the transmission-daemon as a regular user. [snip] /usr/bin/sudo -u $USERNAME -p $PASSWD $DAEMON -g $CONFIGDIR I think there's your problem, -p $PASSWD doesn't make any sense, see man 1 sudo. rc.local runs as root, root doesn't need to know the password for $USERNAME in order to run as $USERNAME so just do /usr/bin/sudo -u $USERNAME $DAEMON Not sure what you're trying to achieve with -g $CONFIGDIR either, again see man 1 sudo. Cheers, Damon
İSTANBUL-DAN RUSYA-YA BİR GÜNDE KARGO SERVİSİ
Sanex Express SANEX EXPRESS LTD (TURKEY) Call Center:0090 212 474 65 65 Pbx :0090 212 655 90 73 :0090 212 655 90 83 Fax:0090 212 655 54 37 Office Gsm:0090 542 318 05 05 Msn:sanexexpr...@hotmail.com Web:www.sanexexpress.com.tr SANEX CARGO ]le Paketler Ertesi G|n RUSYA 'da Rusya ya Gidecek Zarf ve Paketler Saat 18.00'e Kadar Sanex Express'e Verildipinde Teslimat Ertesi G|n Yap}l}yor. Sanex Express Zaman}nda Teslimat} Garanti Ediyor. RUSYA kaynakl} Sanex Express, Rusya'da 3 Merkez Ofis,16 acentas}yla, hizmet veriyor. Sanex Express gvnderiyle Rusya'n}n her yerine en k}sa zamanda ula~}yor. Gvnderilerin t|m g|mr|kleme i~lemlerini de sanex Express yap}yor. Vrnepin ]stanbul'dan saat 18.00'de Sanex Express kuryesine m|~terinin adresinden teslim edilen gvnderiler Russia,Ukrayna ,Beyaz Rusya, Moldova, Azerbaycan, Turkmenistan, Kazakistan, K}rg}z}stan, G|rcistan, Ermenistan, Bulgaristan ve Romanya gibi |lkelerin genelinde al}c}lara bir i~ g|n|nde, adresinde imza kar~}l}p} teslim ediliyor. Takip sistemi ile m|~teri gvnderinin saat kagta kime teslim edildipi bilgisini M|~teri hizmetlerin'den (0090 212 474 65 65) Nolu Telefon'dan vprenebiliyor. Sanex Express'de her g|n d|zenli Avrupa ugu~lar}n}n yan}s}ra Rusya-Azerbaycan-Ukrayna,Ortadopu,T|rk Cumhuriyetleri ve ]srail'e yapt}p}m}z direkt ugu~larla d|nya |zerinde 200'| a~k}n noktaya gvnderilerinizi tam bir g|ven ve kalite ile belirttipiniz adrese zaman}nda teslim ediyoruz Sanex Express gelecepin d|nyas}nda yerinizi alman}z igin hizmet veriyor. T|m D|nya'ya ta~}nan numune ve dvk|manlara ek olarak, ]THALAT ve ]HRACAT amagl} gvnderilerinize FORWARDER olarak hizmet vermektedir. Bu hizmeti 5 k}tada 227 |lkeye ve K}br}s'a ula~t}rmaktad}r. Hizmet Noktalar} : Offices: ]ngiltere, Almanya, Gin, Vietnam, Endonazya, Avustralya, Japonya, Tayvan, Tayland, Hong Kong, G|ney Kore, Birle~ik Arap Emirlikleri, Irak, Banglade~, ]ran, Nepal Sri Lanka, Hindistan, Pakistan, Azerbaycan, Bulgaristan, Rusya, Ukranya, G|rcistan, Beyaz Rusya, Kazakistan, K}rg}zistan, Moldova, Tataristan, Yugoslavya, Gek Cumhuriyeti ,Bosna Hersek, Romanya, T|rkmenistan, S}rbistan, Ermenistan, Polanya, Macaristan AMER]KA_ AFR]KA_ AVRUPA_ ASYA_ORTADOPU_UZAKDOPU SANEX EXPRESS LTD (TURKEY) Yenibosna Karayolu No:53 Yenibosna / ]stanbul Call Center: 0090 212 474 65 65 Pbx 0090 212 655 90 73 Fax: (+90 212) 655 54 37 Web :www.sanexexpress.com.tr
El Universal Online Informa
font face=arial size=2 Sabado 10 de abril de 2010 br bCRISLI SERVICIO TECNICO REFRIGERADORES Y LAVADORAS FONO 5549005:/b p Reparaciones de refrigeradores a domiclio - Bio-Bio 684 FONO 5549005 CONSULTE POR VISITAS A DOMICILIO p El Universal te informa que bSERVICIO TECNICO REFRIGERADORES/b ha accesado un artmculo en nuestro portal y te envia este correo para que tu tambien puedas leerlo. br Puedes consultar este artmculo en el siguiente url: br a href=http://www.tecnogas.cl//emailhttp://www.tecnogas.cl//email/a p El Universal te da las gracias por tu preferencia. br /font
Re: is skype using encryption?
On Sat, Apr 10, 2010 at 7:55 AM, Jozsi Vadkan jozsi.avad...@gmail.com wrote: Can someone [same subnet, e.g.: with a hub, not switch..] sniff my skype password when i'm using Skype? Is it encrypted? Why are you asking a Skype support question on an OpenBSD mailing list? The best way to know is to dump the data yourself via BPF or PCAP. Then analyze the traffic packet by packet. jb
spamlogd and authenticated synchronisation of spamd
Hi, I read man spamd and man spamlogd about synchronisation. In man spamlogd i miss a point: If i use the authentication of spamd synchronisation messages with a /etc/mail/spamd.key file, what happens with the sync messages of spamlogd? The manpage of spamlogd doesn't tell me anything about authentication? Cheers Rene -- Reni Maroufi i...@maroufi.net
pkg_add -F update downgrades the packages
Hello. pkg_add -nui -F update -F updatedepends downgrades packages to their lower versions. output: Candidates for updating mysql-client-5.0.89 - mysql-client-5.0.83 Candidates for updating mysql-server-5.0.89 - mysql-server-5.0.83 Candidates for updating p5-DBD-mysql-4.010 - p5-DBD-mysql-4.010 Candidates for updating php5-core-5.2.12 - php5-core-5.2.10 Candidates for updating php5-curl-5.2.12 - php5-curl-5.2.10 Candidates for updating php5-gd-5.2.12 - php5-gd-5.2.10 Candidates for updating php5-mbstring-5.2.12 - php5-mbstring-5.2.10 Candidates for updating php5-mcrypt-5.2.12 - php5-mcrypt-5.2.10 Candidates for updating php5-mysql-5.2.12 - php5-mysql-5.2.10 Candidates for updating php5-mysqli-5.2.12 - php5-mysqli-5.2.10 ... Using OpenBSD 4.6-stable stable branch for the 4.6 release. Best Regards. -- Ozi
Re: ACPI so close I can almost taste it...
PS: Unfortunately, after some few seconds, even if if looks as if everything had gone just perfect (em0, usb etc are resumed), I get Sorry, that's not true. It does not resume. It looks like, but when I get the prompt I cannot even make a ls Then I get the panic.
Re: Execute startup script as user
Mats-Gxran Karlsen matsg...@gmail.com wrote: I'm trying to create a startup script that executes the transmission-daemon as a regular user. /usr/bin/sudo -u $USERNAME -p $PASSWD $DAEMON -g $CONFIGDIR You are going about this the wrong way. sudo(8) is primarily designed to give additional priviledges to an unpriviledged user. You want to use su(1): su $USERNAME -c $DAEMON -g $CONFIGDIR -- Christian naddy Weisgerber na...@mips.inka.de
Re: is skype using encryption?
from 2005 http://share.skype.com/sites/security/2005/10/skype_security_and_encryption.html and from that: http://www.skype.com/security/files/2005-031%20security%20evaluation.pdf On 10 April 2010 15:55, Jozsi Vadkan jozsi.avad...@gmail.com wrote: Can someone [same subnet, e.g.: with a hub, not switch..] sniff my skype password when i'm using Skype? Is it encrypted? Thank you for the info
updating packages with ports binaries
I follow stable tree, OPENBSD_4_6 branch. I'd like to update some of my packages. As an example, # pkg_add -unvi tiff gives the following message; 'No need to update tiff-3.8.2p4' but my /usr/ports (OPENBSD_4_6) has tiff-3.8.2p5. After running 'make package' inside ./graphics/tiff, i got the binary file tiff-3.8.2p5.tgz from /usr/ports/packages/i386/all and i replaced the old tiff package with that one by doing pkg_add -rvi ./tiff-3.8.2p5.tgz I wonder if that would create any problem. As the system says 'No need to update tiff-3.8.2p4'. (I know that its already the latest one from packages) but i still update them to higher versions with my stable ports binaries. I had to do the same for my php5 package too, (from php5-core-5.2.10 to php5-core-5.2.12) Because i was getting httpd segfault crashes (suhosin?) with the latest stable php5 package. (php5-core-5.2.10) Is this a mistake? Is it ok to replace an installed package with a higher version of it from the ports? Thanks.
Re: ACPI so close I can almost taste it...
hey! I have a thinkpad x200s and with a recent snapshot I can confirm here that the laptop suspends in a fraction of a second and resumes again almost immediately Unfortunately, after some few seconds, even if if looks as if everything had gone just perfect (em0, usb etc are resumed), I get ahci_get_err_ccb but SACT 03ff != 0? panic: kernel diagnostic assertion ahci_pread(ap, AHCI_PREG_CI) == 0 failed: file ../../../../dev/pci/ahci.c, line 2037 Stopped at Debugger+0x4: leave RUEN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC! IF RUNNING SMP, USE 'mach ddbcpu #' AND 'trace' ON OTHER PROCESSORS, TOO. (...) ddb{0} Then I ran trace and ps and I get a long output. I have taken three pictures of the output and uploaded them here: www.aei.mpg.de/~pau/1.jpg www.aei.mpg.de/~pau/2.jpg www.aei.mpg.de/~pau/3.jpg (about 180K each) I hope this help Thanks! Pau 2010/4/10 Josh Rickmar joshua_rick...@eumx.net: On Fri, Apr 09, 2010 at 03:44:54PM -0400, STeve Andre' wrote: On Friday 09 April 2010 03:37:17 Josh Rickmar wrote: On Thu, Apr 08, 2010 at 08:53:12PM -0400, STeve Andre' wrote: Willing to be a test case for other ideas! Same here, I have a T500 and just upgraded to the latest -current to test out the new suspend and resume. My dmesg: Interesting, so you can at least partly reactivate, which I cannot. What do you do to suspend? --STeve Andre' zzz
Re: Attaching to a USB keyboard
On 2010/04/10 12:43, Jens Teglhus Mxller wrote: On 09-04-2010 15:06, Stuart Henderson wrote: On 2010-04-09, Jens Teglhus M?llerj...@mostlyharmless.dk wrote: Is it possible for a process to consume all output for a (this) particular keyboard I don't know about that.. What i was fishing for was if it is possible in a simple way (like having a process read from /dev/ukbd* or something similar) that would consume the data and not have it output on the terminal. It might be possible, but that's the thing I don't know about. or do i have to force it into ugen (is that even possible) and you already know how to force it into ugen, same thing you did for the Velleman kit :) Yeah at the time of writing i was just a little unsure if ubkd was a uhid device and therefore could be forced into ugen with a quirk, but when i look at the man page i can see that ukbd attaches at uhiddev. I'm not sure if that would make sense to commit this one though, as presumably some people will want the device to present keyboard input.. No, i can see that perhaps i will need to keep a local diff to do that try to read the output myself? I would look around and see if someone already has code for this using libusb (which is fairly portable)... But wouldn't i still need some way of telling the kernel not to attach the device? Like a quirk or disabling it via ukc like chriss bennet suggested (and config -e for a more permanent solution). Or Yes you would, that would be a way to access it once it's attached to ugen. You can use config -e and disable uhid as long as you don't need it for your main keyboard. can libusb tell the kernel to no longer handle the device? Unfortunately not. It would be useful (we could remove all these messy BAD_HID quirks...) but not possible at the moment. Some other OS allow libusb to talk to a device even though it's claimed by a driver, however that isn't really entirely safe. I don't have the dmesg/attach info at hand, but will post it later if required. Best regards Jens
Re: Execute startup script as user
On Sat, Apr 10, 2010 at 12:38:25PM +0200, Mats-G?ran Karlsen wrote: Hello. I'm running a headless OpenBSD server. I'm trying to create a startup script that executes the transmission-daemon as a regular user. Details: located in /etc/transmission/rc.transmission permissions -rw-r- 1 root wheel 390 Jul 13 18:30 rc.transmission Script follows: ---script start #! /bin/sh #Provides transmission-daemon # --- Configuration --- USERNAME=username PASSWD=password # --- End configuration --- DESC=bittorrent client NAME=transmission-daemon DAEMON=$(which $NAME) CONFIGDIR=/home/$USERNAME/.config/$NAME #Start daemon /usr/bin/sudo -u $USERNAME -p $PASSWD $DAEMON -g $CONFIGDIR --script end- The following is appended to /etc/rc.conf -- transmission=YES -- the following is appended to /etc/rc.local -- if [ -f /etc/transmission/rc.transmission]; then if [ X${transmission} = XYES -a -x /usr/local/bin/transmission-daemon ]; then echo -n ' transmission-daemon'; . /etc/transmission/rc.transmission fi fi -- The rc.transmission script runs fine when executed under root, but it isn't executed during boot. Have been roaming around for tips but since i haven't figured out how OpenBSD executes startup scripts with other owners than root i'm out of ideas. Hope somebody can give me pointers to what's wrong. root is allowed to sudo anything. why not just do: if [ -x /usr/local/bin/transmission-daemon -a \ XR{transmission} = XYES ]; then - echo -n ' transmission-daemon' sudo -u user /usr/local/bin/transmission-daemon \ -g /home/user/.config/transmission-daemon fi -0- -- I don't think they could put him in a mental hospital. On the other hand, if he were already in, I don't think they'd let him out.
Re: is skype using encryption?
On Sat, Apr 10, 2010 at 10:55 AM, Jozsi Vadkan jozsi.avad...@gmail.com wrote: Can someone [same subnet, e.g.: with a hub, not switch..] sniff my skype password when i'm using Skype? Is it encrypted? Check the source. Oh wait
Re: is skype using encryption?
Check the source. Oh wait lol
Re: Execute startup script as user
na...@mips.inka.de (Christian Weisgerber) wrote: Mats-Gxran Karlsen matsg...@gmail.com wrote: I'm trying to create a startup script that executes the transmission-daemon as a regular user. /usr/bin/sudo -u $USERNAME -p $PASSWD $DAEMON -g $CONFIGDIR You are going about this the wrong way. sudo(8) is primarily designed to give additional priviledges to an unpriviledged user. You want to use su(1): su $USERNAME -c $DAEMON -g $CONFIGDIR -- Christian naddy Weisgerber na...@mips.inka.de I truly believed that one of the most useful uses was to drop privilegies... maybe some reading will help you? sudo(8), sudoers(5). Saludos. -- DISCLAIMER: http://goldmark.org/jeff/stupid-disclaimers/ This message will self-destruct in 3 seconds.
OT - C compiler, assignement on double-declared variable with different types
This is not really OpenBSD related but since it's a UNIX-like OS and here are really experienced people coding in C I thought this was a good place to ask. Coding some simple stuff in C I ended up having a harmless mistake (I hope) a double-declared variable with different types (char and int for the example) in wich I did assignements beyond the bounds of the type size. Let's call it foo, declared in files compiled separatedly. Also say that everything it's compiled with gcc -c option (exect the final executable) without warnings of any kind: file a.c contains char foo on the code. and b.c contains int foo on the code. on the b.c file I made an assignement bigger than de byte limit, let's say 0x2211 for the example. Back to a.c later than the 0x2211 assignement I printed the variable and showed 0x11 (at that point i realized the mistake). But I was just wondering where the h*ll went the 0x22 bits on the memory?? I mean, the code reserved 1 byte as foo was declared as a char, and I assined there more than expected (0x2211 for example). I know the rigth thing is to declare the variable 'foo' on a header file and include it in all my code but I was just curious, what happends to the upper 0x22 ?? Was I accessing to a ilegal zone of memory?? the code executed without any error :o and the compiler showed no warning. Thanks for your time, and sorry for my english. -J
Re: Execute startup script as user
On Sat, 10 Apr 2010 22:27:06 -0500, Abel Abraham Camarillo Ojeda wrote: You are going about this the wrong way. sudo(8) is primarily designed to give additional priviledges to an unpriviledged user. You want to use su(1): su $USERNAME -c $DAEMON -g $CONFIGDIR -- Christian naddy Weisgerber na...@mips.inka.de I truly believed that one of the most useful uses was to drop privilegies... maybe some reading will help you? sudo(8), sudoers(5). Saludos. Maybe some reading will help you? Here is a snip from a file (/usr/ports/geo/openbsd-developers/files/OpenBSD): 8- - 49.22 -123.10 hugh # Hugh Graham 49.313446 -123.063975 mjc # Michael Coulter 49.48 8.42naddy # Christian Weisgerber 50.752 -3.276 sthen # Stuart Henderson 50.858 4.3897 xsa # Xavier Santolaria 50.87 4.37steven# Steve Mestdagh 8- - See anybody in there who needs a lesson? They are all OpenBSD developers.. and you are what, exactly? *** NOTE *** Please DO NOT CC me. I am subscribed to the list. Mail to the sender address that does not originate at the list server is tarpitted. The reply-to: address is provided for those who feel compelled to reply off list. Thankyou. Rod/ --- This life is not the real thing. It is not even in Beta. If it was, then OpenBSD would already have a man page for it.
Re: SOLVED OT - C compiler, assignement on double-declared variable with different types
El 11/04/2010 6:14, Jesus Sanchez escribis: This is not really OpenBSD related but since it's a UNIX-like OS and here are really experienced people coding in C I thought this was a good place to ask. Coding some simple stuff in C I ended up having a harmless mistake (I hope) a double-declared variable with different types (char and int for the example) in wich I did assignements beyond the bounds of the type size. Let's call it foo, declared in files compiled separatedly. Also say that everything it's compiled with gcc -c option (exect the final executable) without warnings of any kind: file a.c contains char foo on the code. and b.c contains int foo on the code. on the b.c file I made an assignement bigger than de byte limit, let's say 0x2211 for the example. Back to a.c later than the 0x2211 assignement I printed the variable and showed 0x11 (at that point i realized the mistake). But I was just wondering where the h*ll went the 0x22 bits on the memory?? I mean, the code reserved 1 byte as foo was declared as a char, and I assined there more than expected (0x2211 for example). I know the rigth thing is to declare the variable 'foo' on a header file and include it in all my code but I was just curious, what happends to the upper 0x22 ?? Was I accessing to a ilegal zone of memory?? the code executed without any error :o and the compiler showed no warning. Thanks for your time, and sorry for my english. -J OK, doing a deep search I found this (think that my foo variable is the symbol the quote talks about): -- .comm declares a common symbol named symbol. When linking, a common symbol in one object file may be merged with a defined or common symbol of the same name in another object file. If ld does not see a definition for the symbol--just one or more common symbols--then it will allocate length bytes of uninitialized memory. length must be an absolute expression. If ld sees multiple common symbols with the same name, and they do not all have the same size, it will allocate space using the largest size. When using ELF, the .comm directive takes an optional third argument. This is the desired alignment of the symbol, specified as a byte boundary (for example, an alignment of 16 means that the least significant 4 bits of the address should be zero). The alignment must be an absolute expression, and it must be a power of two. If ld allocates uninitialized memory for the common symbol, it will use the alignment when placing the symbol. If no alignment is specified, as will set the alignment to the largest power of two less than or equal to the size of the symbol, up to a maximum of 16. seen on: http://stackoverflow.com/questions/501105/gcc-generated-assembly-comm - so regarding my question, ld will use the largest memory space found as a .comm foo, so no harm at all with this mistake :D thanks for your time anyway. -J
[no subject]
Hiya all, Could someone clarify for me the purpose of the bandwidth parameter when used with hfsc? Please consider my queue (512Kb max upload through the ADSL line): altq on em1 bandwidth 500Kb hfsc queue { ack, dns, ssh, other } queue ackbandwidth 95% priority 8 qlimit 500 hfsc (realtime 20%) queue dnsbandwidth 95% priority 7 qlimit 500 hfsc (realtime5%) queue sshbandwidth 95% priority 6 qlimit 500 hfsc (realtime 20%) {ssh_login, ssh_bulk} queue ssh_login bandwidth 95% priority 6 qlimit 500 hfsc queue ssh_bulk bandwidth 95% priority 5 qlimit 500 hfsc queue other bandwidth 95% priority 5 qlimit 500 hfsc (realtime 20% default) My understanding was that bandwidth xx% tells pf that the queue can only use xx% of the total parent queue bandwidth and the various guides on the Internet say that it cannot go above 100% which sort of makes sense. However what I want, for example, is the 'other' queue to get all the upload bandwidth as long as there is no acks or ssh traffic in the queue. If I set bandwidth 20% for other, won't that mean that no matter what, the 'other' queue will only get a maximum of 20% of the bandwidth (even if there is no ssh traffic waiting?) I think I haven't quite understood this properly but perhaps someone could clarify it. I found a lot out from calomel.org's excellent page but that's the only bit that confused me. Thanks
Re: SOLVED OT - C compiler, assignement on double-declared variable with different types
On Sat, Apr 10, 2010 at 10:14 PM, Jesus Sanchez zexe...@gmail.com wrote: El 11/04/2010 6:14, Jesus Sanchez escribis: This is not really OpenBSD related but since it's a UNIX-like OS and here are really experienced people coding in C I thought this was a good place to ask. Coding some simple stuff in C I ended up having a harmless mistake (I hope) a double-declared variable with different types (char and int for the example) in wich I did assignements beyond the bounds of the type size. Let's call it foo, declared in files compiled separatedly. Also say that everything it's compiled with gcc -c option (exect the final executable) without warnings of any kind: file a.c contains char foo on the code. and b.c contains int foo on the code. on the b.c file I made an assignement bigger than de byte limit, let's say 0x2211 for the example. Back to a.c later than the 0x2211 assignement I printed the variable and showed 0x11 (at that point i realized the mistake). But I was just wondering where the h*ll went the 0x22 bits on the memory?? I mean, the code reserved 1 byte as foo was declared as a char, and I assined there more than expected (0x2211 for example). I know the rigth thing is to declare the variable 'foo' on a header file and include it in all my code but I was just curious, what happends to the upper 0x22 ?? Was I accessing to a ilegal zone of memory?? the code executed without any error :o and the compiler showed no warning. Thanks for your time, and sorry for my english. -J OK, doing a deep search I found this (think that my foo variable is the symbol the quote talks about): -- .comm declares a common symbol named symbol. When linking, a common symbol in one object file may be merged with a defined or common symbol of the same name in another object file. If ld does not see a definition for the symbol--just one or more common symbols--then it will allocate length bytes of uninitialized memory. length must be an absolute expression. If ld sees multiple common symbols with the same name, and they do not all have the same size, it will allocate space using the largest size. When using ELF, the .comm directive takes an optional third argument. This is the desired alignment of the symbol, specified as a byte boundary (for example, an alignment of 16 means that the least significant 4 bits of the address should be zero). The alignment must be an absolute expression, and it must be a power of two. If ld allocates uninitialized memory for the common symbol, it will use the alignment when placing the symbol. If no alignment is specified, as will set the alignment to the largest power of two less than or equal to the size of the symbol, up to a maximum of 16. seen on: http://stackoverflow.com/questions/501105/gcc-generated-assembly-comm - so regarding my question, ld will use the largest memory space found as a .comm foo, so no harm at all with this mistake :D i don't think so. Use gdb and see where you are writing to. Based on your description of your a.c and b.c, I assume in a.c you have char foo; (global), and in b.c you by mistake have extern int foo;. If your foo variable is at address, say 0x, and you write two bytes to that address, where foo is in fact a char (single byte), the other byte will be written to address 0x1112. You can test this with a simple example program, where you can declare other char variables around your foo variable and print all of them after the foo assignment and see which ones got clobbered. Then again, maybe I'm misunderstanding your initial problem, you didn't show your code. --patrick Breakpoint 1, main (argc=1, argv=0xfffc8c8c) at a.c:30 30 bar(); (gdb) p f $1 = (int *) 0x1842116 (gdb) x/4b 0x1842116 0x1842116 f: 0x000x000x000x00 bar () at b.c:14 14 f = 0x44332211; (gdb) n 16 } (gdb) x/4b 0x1842116 0x1842116 f: 0x440x330x220x11 (gdb) p g $2 = 0x1842117 3\\021 (gdb) p k $3 = 0x1842119 \021 (gdb) p l $4 = 0x1842118 \\021 (gdb) p/x f $13 = 0x44332211 (gdb) p/x g $14 = 0x33 (gdb) p/x l $15 = 0x22 (gdb) p/x k $16 = 0x11 Looks like the extern int foo; confused gdb. thanks for your time anyway. -J