Re: [lfs-support] coreutils

2012-12-29 Thread xinglp
2012/12/29 Simon Geard delga...@ihug.co.nz:
 On Fri, 2012-12-28 at 16:20 +0100, Tobias Gasser wrote:
 version 8.20 is available since oct 23.
 lfs-book has a ticket for it: 3215

 searching the lists just show the ticket, but no further comments so far.

 the ticket says 'no announce yet', here it is:

 http://lists.gnu.org/archive/html/coreutils-announce/2012-10/msg0.html

 + bugfix release
 + speed improvement

 - nothing i can see

 what am i missing?

 I'm running it, no problems. The 8.19 i18n patch didn't apply cleanly,
 but since the bits that failed were tests only (they seem to have
 renamed and moved a bunch of test files), I didn't worry about it.

 Simon.

make -j2 error:
help2man: can't get '--help' info from man/df.td/df
make[2]: *** [man/df.1] Error 127
make[2]: *** Waiting for unfinished jobs

make -j1 works fine.

 --
 http://linuxfromscratch.org/mailman/listinfo/lfs-support
 FAQ: http://www.linuxfromscratch.org/lfs/faq.html
 Unsubscribe: See the above information page

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] coreutils

2012-12-29 Thread Simon Geard
On Sat, 2012-12-29 at 19:37 +0800, xinglp wrote:
 make -j2 error:
 help2man: can't get '--help' info from man/df.td/df
 make[2]: *** [man/df.1] Error 127
 make[2]: *** Waiting for unfinished jobs
 
 make -j1 works fine.

Yeah, I wouldn't have noticed that - as commented in other threads
recently, my approach is to build each package single-worker, but
building multiple packages in parallel.

Simon.


signature.asc
Description: This is a digitally signed message part
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] ld got lost in 6.10

2012-12-29 Thread Sven Bartscher
Am 28.12.2012 17:23, schrieb Sven Bartscher:
 Am 28.12.2012 12:42, schrieb Sven Bartscher:
 Am 27.12.2012 15:29, schrieb Thomas de Roo:
 On 12/27/12 15:06, Sven Bartscher wrote:
 Hey guys!
 I worked trough th chapter 6 of LFS and come to the point 6.10
 Adjusting the toolchain then i got an error a.out no such file or
 directory after the command readelf -l a.out | grep ': /lib' then i
 tried to fix it myself and did an epic fail! i done the following 
 steps
 again:
 mv -v /tools/bin/{ld,ld-old}
 mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
 mv -v /tools/bin/{ld-new,ld}
 ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld

 as mv -v /tools/bin/{ld-new,ld} failed with an error
 (/tools/bin/ld-new no such file or directory) i noticed that i
 overwrote the backups of ld! and now i don't know how to get them 
 back.
 Can anyone help me?

 my LFS version: 7.2
 My host distribution: Ubuntu 12.10 64bit
 my version-check.sh output:

 sven@Sven-Ubuntu:~$ bash version-check.sh
 bash, version 4.2.37(1)-release
 /bin/sh - /bin/dash
 Binutils: (GNU Binutils for Ubuntu) 2.22.90.20120924
 bison (GNU Bison) 2.5
 /usr/bin/yacc - /usr/bin/bison.yacc
 bzip2,  Version 1.0.6, 6-Sept-2010.
 Coreutils:  8.13
 diff (GNU diffutils) 3.2
 find (GNU findutils) 4.4.2
 GNU Awk 4.0.1
 /usr/bin/awk - /usr/bin/gawk
 gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
 (Ubuntu EGLIBC 2.15-0ubuntu20) 2.15
 grep (GNU grep) 2.12
 gzip 1.5
 Linux version 3.5.0-21-generic (buildd@allspice) (gcc version 4.7.2
 (Ubuntu/Linaro 4.7.2-2ubuntu1) ) #32-Ubuntu SMP Tue Dec 11 18:51:59 
 UTC 2012
 m4 (GNU M4) 1.4.16
 GNU Make 3.81
 patch 2.6.1
 Perl version='5.14.2';
 GNU sed version 4.2.1
 tar (GNU tar) 1.26
 Texinfo: makeinfo (GNU texinfo) 4.13
 xz (XZ Utils) 5.1.0alpha
 gcc compilation OK
 sven@Sven-Ubuntu:~$
 /bin/sh - /bin/dash: That is wrong. /bin/sh should be a link to 
 /bin/bash. I'm not sure if that is the cause of your problem though.

 I suggest you leave the chroot, su to the lfs-user, and redo chapter 
 5.8, without the make and make install.

 Groet,
 Thomas

 Are you sure i don't have to do the make command?  I i don't there is 
 no ld directory in the binutils-build directory, or should i get the 
 d file from the binutils2.22/ld directory?
 oh i forgot to write this:
 here my new version-check.sh output:
 sven@Sven-Ubuntu:~$ sh version-check.sh
 bash, version 4.2.37(1)-release
 /bin/sh - /bin/bash
 Binutils: (GNU Binutils for Ubuntu) 2.22.90.20120924
 bison (GNU Bison) 2.5
 /usr/bin/yacc - /usr/bin/bison.yacc
 bzip2,  Version 1.0.6, 6-Sept-2010.
 Coreutils:  8.13
 diff (GNU diffutils) 3.2
 find (GNU findutils) 4.4.2
 GNU Awk 4.0.1
 /usr/bin/awk - /usr/bin/gawk
 gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
 (Ubuntu EGLIBC 2.15-0ubuntu20) 2.15
 grep (GNU grep) 2.12
 gzip 1.5
 Linux version 3.5.0-21-generic (buildd@allspice) (gcc version 4.7.2 
 (Ubuntu/Linaro 4.7.2-2ubuntu1) ) #32-Ubuntu SMP Tue Dec 11 18:51:59 
 UTC 2012
 m4 (GNU M4) 1.4.16
 GNU Make 3.81
 patch 2.6.1
 Perl version='5.14.2';
 GNU sed version 4.2.1
 tar (GNU tar) 1.26
 Texinfo: makeinfo (GNU texinfo) 4.13
 xz (XZ Utils) 5.1.0alpha
 gcc compilation OK
 sven@Sven-Ubuntu:~$

 i unpacked the binutils2.22.tar.bz2 then i the binutils-buil directory 
 and run the configure script, but then there was no ld directory. so i 
 run make and then there was the ld directory. I copied it to the 
 required directorys and continued the book in chapter 6.10. Then i run 
 this test:

 root:/# echo 'main(){}'  dummy.c
 root:/# cc dummy.c -v -W1,--verbose  dummy.log
 root:/# readelf -l a.out | grep ': /lib'
 readelf: Error: 'a.out': No such file
 root:/#

 like it happened before i deleted the ld-files by a mistake. Do anyone 
 know what i can do now?

 PS: Sorry for bad English, i'm from germany and don't speak English so 
 good.
sorry i forgot to see at the dummy.log file there are this errors:

root:/# cat dummy.log

cc1: error: unrecognized command line option '-issystem'

cc1: fatal error: /usr/include: No such file or directory
compilation terminated.

the /usr/include directory exists!
 like it happened before i deleted the ld-files by a mistake. Do anyone 
 know what i can do now?
that didn't mean i deleted the ld file again. Sorry for bad english.


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] ld got lost in 6.10

2012-12-29 Thread Sven Bartscher
Am 29.12.2012 21:45, schrieb Sven Bartscher:
 Am 28.12.2012 17:23, schrieb Sven Bartscher:
 Am 28.12.2012 12:42, schrieb Sven Bartscher:
 Am 27.12.2012 15:29, schrieb Thomas de Roo:
 On 12/27/12 15:06, Sven Bartscher wrote:
 Hey guys!
 I worked trough th chapter 6 of LFS and come to the point 6.10
 Adjusting the toolchain then i got an error a.out no such file or
 directory after the command readelf -l a.out | grep ': /lib' 
 then i
 tried to fix it myself and did an epic fail! i done the following 
 steps
 again:
 mv -v /tools/bin/{ld,ld-old}
 mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
 mv -v /tools/bin/{ld-new,ld}
 ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld

 as mv -v /tools/bin/{ld-new,ld} failed with an error
 (/tools/bin/ld-new no such file or directory) i noticed that i
 overwrote the backups of ld! and now i don't know how to get them 
 back.
 Can anyone help me?

 my LFS version: 7.2
 My host distribution: Ubuntu 12.10 64bit
 my version-check.sh output:

 sven@Sven-Ubuntu:~$ bash version-check.sh
 bash, version 4.2.37(1)-release
 /bin/sh - /bin/dash
 Binutils: (GNU Binutils for Ubuntu) 2.22.90.20120924
 bison (GNU Bison) 2.5
 /usr/bin/yacc - /usr/bin/bison.yacc
 bzip2,  Version 1.0.6, 6-Sept-2010.
 Coreutils:  8.13
 diff (GNU diffutils) 3.2
 find (GNU findutils) 4.4.2
 GNU Awk 4.0.1
 /usr/bin/awk - /usr/bin/gawk
 gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
 (Ubuntu EGLIBC 2.15-0ubuntu20) 2.15
 grep (GNU grep) 2.12
 gzip 1.5
 Linux version 3.5.0-21-generic (buildd@allspice) (gcc version 4.7.2
 (Ubuntu/Linaro 4.7.2-2ubuntu1) ) #32-Ubuntu SMP Tue Dec 11 
 18:51:59 UTC 2012
 m4 (GNU M4) 1.4.16
 GNU Make 3.81
 patch 2.6.1
 Perl version='5.14.2';
 GNU sed version 4.2.1
 tar (GNU tar) 1.26
 Texinfo: makeinfo (GNU texinfo) 4.13
 xz (XZ Utils) 5.1.0alpha
 gcc compilation OK
 sven@Sven-Ubuntu:~$
 /bin/sh - /bin/dash: That is wrong. /bin/sh should be a link to 
 /bin/bash. I'm not sure if that is the cause of your problem though.

 I suggest you leave the chroot, su to the lfs-user, and redo 
 chapter 5.8, without the make and make install.

 Groet,
 Thomas

 Are you sure i don't have to do the make command?  I i don't there 
 is no ld directory in the binutils-build directory, or should i get 
 the d file from the binutils2.22/ld directory?
 oh i forgot to write this:
 here my new version-check.sh output:
 sven@Sven-Ubuntu:~$ sh version-check.sh
 bash, version 4.2.37(1)-release
 /bin/sh - /bin/bash
 Binutils: (GNU Binutils for Ubuntu) 2.22.90.20120924
 bison (GNU Bison) 2.5
 /usr/bin/yacc - /usr/bin/bison.yacc
 bzip2,  Version 1.0.6, 6-Sept-2010.
 Coreutils:  8.13
 diff (GNU diffutils) 3.2
 find (GNU findutils) 4.4.2
 GNU Awk 4.0.1
 /usr/bin/awk - /usr/bin/gawk
 gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
 (Ubuntu EGLIBC 2.15-0ubuntu20) 2.15
 grep (GNU grep) 2.12
 gzip 1.5
 Linux version 3.5.0-21-generic (buildd@allspice) (gcc version 4.7.2 
 (Ubuntu/Linaro 4.7.2-2ubuntu1) ) #32-Ubuntu SMP Tue Dec 11 18:51:59 
 UTC 2012
 m4 (GNU M4) 1.4.16
 GNU Make 3.81
 patch 2.6.1
 Perl version='5.14.2';
 GNU sed version 4.2.1
 tar (GNU tar) 1.26
 Texinfo: makeinfo (GNU texinfo) 4.13
 xz (XZ Utils) 5.1.0alpha
 gcc compilation OK
 sven@Sven-Ubuntu:~$

 i unpacked the binutils2.22.tar.bz2 then i the binutils-buil 
 directory and run the configure script, but then there was no ld 
 directory. so i run make and then there was the ld directory. I 
 copied it to the required directorys and continued the book in 
 chapter 6.10. Then i run this test:

 root:/# echo 'main(){}'  dummy.c
 root:/# cc dummy.c -v -W1,--verbose  dummy.log
 root:/# readelf -l a.out | grep ': /lib'
 readelf: Error: 'a.out': No such file
 root:/#

 like it happened before i deleted the ld-files by a mistake. Do 
 anyone know what i can do now?

 PS: Sorry for bad English, i'm from germany and don't speak English 
 so good.
 sorry i forgot to see at the dummy.log file there are this errors:

 root:/# cat dummy.log

 cc1: error: unrecognized command line option '-issystem'

 cc1: fatal error: /usr/include: No such file or directory
 compilation terminated.

 the /usr/include directory exists!
 like it happened before i deleted the ld-files by a mistake. Do 
 anyone know what i can do now?
 that didn't mean i deleted the ld file again. Sorry for bad english.


Ok after some trying in the last five minutes i found my error...
I typed not cc dummy.c -v -Wl(lowercase L),--verbose  dummy.log
i typed cc dummy.c -v -W1(one),--verbose  dummy.log
now it works fine
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


[lfs-support] Wirenet, the first (?) real malware for Linux.

2012-12-29 Thread Aleksandar Kuktin
Note that this mail is cross-posted to lfs-support, blfs-support and
lfs-security, with a Reply-To set to lfs-security.

This is also the first mail on the lfs-security list in at least three
years. Yaay!

Anyway, the news is from august/september of 2012, so it's a little
stale. However, the search function over on LWN returns NULL when asked
for wirenet. OTOH, Forbes and The Register both wrote a small article
each on the subject. A bunch of other sites copy-pasted the content
from each other. H-Online also wrote a /very/ interesting article on
the subject, discussed below.

I have discovered this only today, and purely by accident. And then I
thought it would be prudent to warn the LFS community about it.

https://www.virustotal.com/file/1c4ba1bf8003b9d66b4423e0503bf5489cd4de13b1a3038499d039baa553cd0e/analysis/

http://blog.webroot.com/2012/09/14/wirenet-the-password-stealing-trojan-lands-on-linux-and-os-x/
http://news.techworld.com/security/3378804/linux-users-targeted-by-password-stealing-wirenet-trojan/
http://news.drweb.com/show/?i=2679lng=en

A Russian security firm called Dr. Web has discovered (made public ?)
what they call a trojan capable of infecting Windows, MacOS X and Linux.
Unlike the event about a year ago when a Java worm accidentally
infected the Java plugins of browsers running on Linux, this is the
real deal. ELF executable, X system API calls, Linux syscalls.

According to Techworld, Dr. Web received the sample from Virustotal. I
have not found any infomation regarding the dropper (a different
malicious program which installs this malware on the computer), or any
information regarding the specifics of Wirenet's point and method of
entry. There is also no word on the method Wirenet uses to survive the
shutdown-bootup barier.

The post on Webroot goes to great lengths to explain (some) details of
Wirenet's operation. Wirenet goes after the password caches of Firefox,
SeaMonkey, Chrome/Chromium, Opera, Pidgin and Thunderbird. No word on
whether it also targets keyrings of various PGP implementations (which
is THE treasure stash, IMO). Wirenet is also capable of taking
screenshots, keylogging (both of these via Xlib), remote code execution
and possibly other things.

http://www.h-online.com/security/news/item/Hackers-turn-remote-maintenance-tool-into-trojan-1697425.html

H-Online has a very interesting take on the subject matter. They
basically assert that the program was written by World Wide Labs under
the name NetWire as a legit (ha-ha) remote administration/remote
monitoring tool, but that it got coopted to operate as a malicious
trojan.

In light of that, and taking into account the current lack of a clear
infection/boot-cycle-survival mechanism, it is entirely possible that
Wirenet is a tempest in a teapot, malware without the dropper, a
horsecart without horses (I'll stop now). IOW, I am not sure if it
exists and does damage in the wild or not.

The really interesting thing here, and the thing that really got me
thinking, is the fact that Wirenet neither uses nor needs to use root
to do it's thing. It exist entirely in nonpriviled userspace.

Which makes its mitigation hard(er then neccessary).

Speaking of mitigation, the Internets main advice seems to be Linux is
invulnerable to malware and you should stop worring about this, period,
new paragraf, lalalala. Needless to say, this sort of attitude can only
get one killed and/or robbed. In the interest of mutual safety, I will
now describe my method of using browsers, together with modifications
that should make one almost completely safe from this and other similar
things (ha-ha).

Starting with the premise that the browser has a code execution
vulnerability, which holds true for them all on at least some days
(WebKit, you eternal beta, I am looking at you), you can expect the
browser to drop and start Wirenet. This is my premise. I start with
a day will dawn when my browser will betray me. If this happens,
Wirenet will rob my (nonexistant - I don't store my passwords with the
browser) password caches blind, possibly connect to the X server and do
all sorts of bad things through it.

However, for years I have not trusted my browsers and I have run them
as separate users, sandboxed. My browser doesn't even connect to the
net. It is firewalled and connects to a locally running HTTP proxy
(polipo) and then the proxy connects to the net. Until today, the script
which started the browser would have left the .Xauthority file in the
browsers home directory, but in the light of Wirenet, that may be a bit
too risky. So now it removes .Xauthority 1 second after forking the
browser. I have attached the script starting Firefox for reference.

So, I think that that is probabbly the only surefire way of protecting
oneself: run the browser as a separate, sandboxed user and make sure it
is only exposed to the X cookie for as little as it needs. Assuming
your X server is not promiscous (I have found that running Xorg 1.11 or
1.9 or some such as 

[lfs-support] Building LFS

2012-12-29 Thread vaibhav agarwal
Trying to build linux from scratch from LFS-7.2 , I have reached the
section 5.17 - building CoreUtils . Everything has worked appropriately
till now , but now when I try to make Coreutils I get the following error-

Instruction - make

Error :

CCLD chcon
chcon.o: In function `change_file_context':
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:177: undefined reference to
`context_new'
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:182: undefined reference to
`context_str'
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:198: undefined reference to
`context_free'
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:199: undefined reference to
`freecon'
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:198: undefined reference to
`context_free'
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:199: undefined reference to
`freecon'
chcon.o: In function `compute_context_from_mask':
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:97: undefined reference to
`context_new'
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:119: undefined reference to
`context_user_set'
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:120: undefined reference to
`context_range_set'
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:121: undefined reference to
`context_role_set'
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:122: undefined reference to
`context_type_set'
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:127: undefined reference to
`context_free'
chcon.o: In function `main':
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:547: undefined reference to
`context_new'
/mnt/lfs/sources/coreutils-8.14/src/chcon.c:551: undefined reference to
`context_free'
../lib/libcoreutils.a(getfilecon.o): In function `rpl_getfilecon':
/mnt/lfs/sources/coreutils-8.14/lib/getfilecon.c:71: undefined reference to
`getfilecon'
../lib/libcoreutils.a(getfilecon.o): In function `map_to_failure':
/mnt/lfs/sources/coreutils-8.14/lib/getfilecon.c:60: undefined reference to
`freecon'
../lib/libcoreutils.a(getfilecon.o): In function `rpl_lgetfilecon':
/mnt/lfs/sources/coreutils-8.14/lib/getfilecon.c:78: undefined reference to
`lgetfilecon'
../lib/libcoreutils.a(getfilecon.o): In function `map_to_failure':
/mnt/lfs/sources/coreutils-8.14/lib/getfilecon.c:60: undefined reference to
`freecon'
../lib/libcoreutils.a(getfilecon.o): In function `rpl_fgetfilecon':
/mnt/lfs/sources/coreutils-8.14/lib/getfilecon.c:85: undefined reference to
`fgetfilecon'
../lib/libcoreutils.a(getfilecon.o): In function `map_to_failure':
/mnt/lfs/sources/coreutils-8.14/lib/getfilecon.c:60: undefined reference to
`freecon'
../lib/libcoreutils.a(selinux-at.o): In function `setfileconat':
/mnt/lfs/sources/coreutils-8.14/lib/at-func.c:80: undefined reference to
`setfilecon'
/mnt/lfs/sources/coreutils-8.14/lib/at-func.c:117: undefined reference to
`setfilecon'
/mnt/lfs/sources/coreutils-8.14/lib/at-func.c:73: undefined reference to
`setfilecon'
../lib/libcoreutils.a(selinux-at.o): In function `lsetfileconat':
/mnt/lfs/sources/coreutils-8.14/lib/at-func.c:80: undefined reference to
`lsetfilecon'
/mnt/lfs/sources/coreutils-8.14/lib/at-func.c:117: undefined reference to
`lsetfilecon'
/mnt/lfs/sources/coreutils-8.14/lib/at-func.c:73: undefined reference to
`lsetfilecon'
collect2: ld returned 1 exit status
make[3]: *** [chcon] Error 1
make[3]: Leaving directory `/mnt/lfs/sources/coreutils-8.14/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/mnt/lfs/sources/coreutils-8.14/src'

I am running this on a Ubuntu-11.04 version.


Cheers

-- 
- Vaibhav Agarwal
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page