Search Results: "ag"

3 April 2008

Lars Wirzenius: Secret Life of Machines

"The Secret Life of Machines" is a wonderful British TV series from 1988, about how various everyday machines work. The first season (six episodes) covers the vacuum cleaner, washing machine, sewing machine, fridge, central heating system, and television set. All the usual kind of hard-core geeks already know all that, but since I'm not one of those, I enjoyed the show a lot, and learned from every episode. The show did not have a bid budget. It's less showy than your typical mainstream production from the US: fewer people, fewer computer generated effects, fewer exotic places, and not HD, either (what with being made 20 years before HD). What they lack in budget, they more than compensate in cleverness. It's truly a magnificent show. The wonderful dry British humor doesn't hurt. What's more, the author of the show, Tim Hunkin points people at places to download the show. One of the places is a torrent file at Pirate Bay. That's highly unusual. In order to encourage such behavior, and to help others enjoy the show, I am using some of the bandwidth I have to seed the torrent.

Thijs Kinkhorst: Evaluating Fibre to the Home

Since about half a year now we have a fibre to the home connection. This means that two fiber lines terminate at a box in our living room. It is a blown fibre which means that a tube is buried to your house, after which they use air pressure to put the actual fibre from the house to the POP. There are two fibers: one for bidirectional data (IP), and one that does nothing more than carry the analog cable TV signal. We started out with only the internet facility but now have so-called triple play: phone, analog tv and internet connectivity. The results are in: I find it to be just as good or better than the previous offerings: phone from KPN, tv from Casema or internet from Surfnet. But there's nothing revolutionary. Phone and tv just provide the same service over a different medium. The internet connection is with the standard of 24 Mb/s more than fast enough for any day to day use and an upgrade to 50 Mb/s is pending. A real improvement is that the upstream speed is just as high, very useful when uploading photos, packages or the text of this blog post. One drawback is that they only provide one IP address instead of 32. Also, the service provider (XMSnet) does seem to be a bit stuck in the late nineties with an unfriendly help desk telling you that your situation is impossible , and bad billing, There are plans however to open up the line to other providers in the future. So for now it's just a convenience bundling of services, but nothing really ground breaking. Let's see what the future brings.

Martin F. Krafft: Swiss Hackontest 2008

From the official press release:
April 3, 2008 - The Swiss Open Systems User Group /ch/open organizes the first international Hackontest sponsored by Google as part of informatica08, the Swiss year of computer science 2008. Hackontest is a 24-hour programming competition of three teams of different open source projects. Its goals are to enhance popular Free Software projects according to user needs and to demonstrate to the public how enthusiastically open source software is being developed. Starting in April 2008 users and developers of open source software may submit feature requests for their favorite Free Software projects and rate and comment them. On Swiss national holiday August 1st, 2008 the Hackontest jury will pick the three most promising teams. They may travel to Switzerland on September 24/25, 2008 to participate in the competition located at the OpenExpo Z rich 2008. The jury is staffed of ten highly renowned open source hackers such as Jeremy Alison (founder of Samba), Bruce Perens (founder of the Open Source Initiative), Alexander Limi (founder of Plone), Harald Welte (founder of gpl-violations.org) and Jono Bacon (Ubuntu community leader). The Hackontest platform and further information about the event is located at www.hackontest.org.
I have been asked to serve on the jury. This sounds like it ll be a fun and interesting event, and if not only I finally get to meet Alexander Limi, with whom I ve worked on Plone, and Bram Moolenaar, author of the best editor around. Now, Debian! Let s get some proposals in! NP: The Good, the Bad & the Queen: The Good, the Bad & the Queen

2 April 2008

Peter Van Eynde: ipv6 with a Cisco ADSL router a short howto

For a long time I wanted to play with IPv6, but I never liked any of the tunnels I saw. This evening I started wondering if my Cisco 837 ADSL router cannot handle some form of tunnel.

A short time later and:
router#ping ipv6.google.com
Translating "ipv6.google.com"...domain server (195.238.2.21) [OK]

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:4860:0:1001::68, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 276/278/284 ms


How to do it: I configured a 6to4 tunnel on the router:

ipv6 unicast-routing
ipv6 cef
! enable ipv6
ipv6 inspect name MyIPv6Inspection tcp
ipv6 inspect name MyIPv6Inspection udp
ipv6 inspect name MyIPv6Inspection ftp
ipv6 inspect name MyIPv6Inspection icmp
! let's have a firewall
interface Tunnel1
no ip address
no ip redirects
ipv6 address 2002:51F0:CCA5::1/128
ipv6 enable
ipv6 traffic-filter
ipv6ip in
ipv6 inspect MyIPv6Inspection out
tunnel source Dialer1
tunnel mode ipv6ip 6to4

interface Ethernet0
ipv6 address 2002:51F0:CCA5:DEAD::1/128
ipv6 enable

ipv6 route 2002::/16 Tunnel1
ipv6 route ::/0 2002:C058:6301::

ipv6 access-list ipv6ip
deny ipv6 any any


Of course the 6to4 ip (the one on Tunnel0) is derived from my ipv4 ip. Which changes now and again. So I uploaded to the flash of my router the following file:

proc doconf   section setting   
if [ catch ios_config $section $setting errmsg ] error "configuration of $section $setting failed";


set ipaddr [exec "show ip interface Dialer1 i Internet address"]
regexp is ([0-9.]*)/ $ipaddr match ip
regexp ([0-9]*).([0-9]*).([0-9]*).([0-9]*) $ip match a b c d
set newipv6 [format "2002:%2x%2x:%2x%2x::1" $a $b $c $d]
set newintipv6 [format "2002:%2x%2x:%2x%2x:dead::1" $a $b $c $d]
doconf "interface Dialer1" "no ipv6 address"
doconf "interface Dialer1" "ipv6 address $newipv6/128"
doconf "interface Ethernet0" "no ipv6 address"
doconf "interface Ethernet0" "ipv6 address $newintipv6/64"


This is a TCL script that will get the current external ip (from Dialer1) and give the correct IPv6 ips to the right interfaces.

And with alias exec updateipv6 tclsh flash:update-ipv6.tcl I can quickly login and adapt the addresses myself.

The router handles IPv6 autoconfiguration on the inside, so my machine now says:
# ip addr show dev wlan0 scope global
4: wlan0: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:19:d2:28:2c:a4 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.53/24 brd 192.168.1.255 scope global wlan0
inet6 2002:51f0:cca5:dead:219:d2ff:fe28:2ca4/64 scope global dynamic
valid_lft 2590061sec preferred_lft 602861sec

The one remaining problem is that when the external ip changes the autoconfig announcements change too, but the old ipv6 IPs remain on the interfaces.

PS: for those not in the know: I work for Cisco but this was done after hours and using public information (of course)

Russell Coker: Trust and My SE Linux Play Machine

Currently my SE Linux Play Machine [1] is running as a Xen DomU. So if someone cracks it they would also have to crack Xen to get access to directly change things on the hardware (EG modifying the boot process). As documented in my last post [2] a user of my Play Machine recently managed to change my password. Of course this was just two days after the vmsplice() kernel security flaw had been discovered [3]. Of course any machine that offers shell access to remote users (or the ability to run CGI-BIN scripts or other programs that users can upload) is immediately vulnerable to such exploits and while SE Linux has blocked local kernel exploits in the past [4] there will always be the possibility of kernel exploits that SE Linux can’t block or which can be re-written to work in a way that is not stopped by the SE Linux policy. So it’s best to assume that SE Linux systems are vulnerable to kernel exploits. At the time that the vmsplice() exploit was announced there was a claim that it could be used to de-stabilise a Xen Dom0 when run within a DomU. It’s best to assume that any attack which can make some software perform in an unexpected manner can also be used to successfully attack it. So at the time I was working on the assumption that the Dom0 could have been exploited. Therefore I reinstalled the entire machine, I firstly installed a new Dom0 (on which I decided to run Debian/Unstable) and then I made a fresh install of Etch for the Play Machine. There is a possibility that an attacker could compromise the hardware (changing the BIOS or other similar attacks), but this seems unlikely - I doubt that someone would go to such effort to attach hardware that I use for demonstrating SE Linux and for SE Linux development (it has no data which is secret). If someone attacks my Play Machine they would have to first get root on the DomU in question and then crack Xen to get access to the hardware. Then the machine is on a separate Ethernet segment which has less access to my internal network than the general Internet does (so they would not gain any real benefit). One thing an attacker can do is launch a DOS attack on my machine. One summer a Play Machine overheated and died, I suspect that the extra heat produced by a DOS attack contributed to that problem. But losing a low-end machine I bought second-hand is not a big deal. When discussing the machine there are two common comments I get. One is a suggestion that I am putting myself at risk, I think that the risk of visiting random web sites is significantly greater. Another is a challenge to put the machine on my internal network if I really trust SE Linux, as noted I have made mistakes in the past and there have been Linux kernel bugs - but apart from that it’s always best to have multiple layers of protection.

Jeff Bailey: You know things are going poorly when...

... you type in "Barbapapa" in the YouTube search box to pass the time. =)

I've had a rough couple of days - it seems I've developed an intolerance to the pain meds that I was on. I went to the surgeon yesterday to see what we could do about the rash, the constant desire to throw up, and the complete aversion to eating.

I've switched meds now, and unlike at lunch when I went to work to go see some coworkers and I picked over half a bowl of soup, I've had a half-dozen pancakes and a half bowl of a rice-tofu-soyrizo dish that Angie made for dinner.

We're still tweaking the quantity and frequency of the meds (We started at 1 every 6 hours, and are now at 2 every 4 hours), but hopefully we've got it right now.

On the upside, the surgeon visit went very well. They like the way incision is healing, they took X-rays and everything seems good. I have a referral to a physical therapist now (Anyone know a good one around Mountain View?) and I'm permitted to start that in a week or two. My next follow up is at the 6-week mark, and the surgeon says that he'll probably clear me for sitting in the hottub then.

Yay, hottub!

My stamina continues to improve despite this - yesterday I managed a 4-block walk downhill, stopped for dinner, then a 4-block walk uphill again. If you've been to the UCSF medical centre, you'll know what I mean - everything is uphill or downhill from there. Today I went into the office and sorted out some more short term disability paperwork and some more banking paperwork. I'm feeling good about returning to work at the beginning of June.

Christian Perrier: About ISO

As one of the maintainers of the iso-codes package, I feel somewhat ashamed to carry that name today. I just proposed my fellow co-maintainers that we take some symbolic action as a kind of protest in the next upstream release of iso-codes. As a French citizen, I'm ashamed that my country's standard organisation, AFNOR, finally turned its planned NO vote into an abstention at the very last minute. It would have been the only european NO vote as far as I can see from unofficial records of who voted what. Kudos to Brazil, Canada, Ecuador, India, New Zealand, South Africa, Venezuela. I should add China to this but the current actions in Tibet prevent me from doing that. And I can't really support dictatures like Cuba and Iran. (of course, I'm talking about OOXML becoming a 'standard', you'd have guessed, right?)

Pierre Habouzit: [RC-Bug-A-Day] Day 17

Today's RC bug was 470462, removal of a package that as a patch for a FTBFS and absolutely no maintainer answers (#417047). I'm also quite excited because I have a mail with 9 nmudiff's for RG/RC bugs waiting to be processed from Sandro Tosi. I want MOAR !

Lior Kaplan: Openoffice.org Issue #86811: Arabic numbers instead of decimal numbers


Issue #86811 is still of my top priorities this week, as it causes a major problem for Hebrew speaking users of Openoffice.org. As I can’t fix the code myself, I’m focusing on explaining that this is a major problem and it should be fixed in the 2.4.1 release. Before explaining more about the bug, let me clear a bit some terminologies: Arabic numbers are the numbers you know from English and most languages (including Hebrew). Hindu numbers are the one in use by the Arabic languages (Arabic, Persian, Urdu, etc). Notice that this is confusing as the numbers in the Arabic languages aren’t Arabic numbers but Hindu numbers. Issue #86811 is about how does OO.org handles numbers during import of Microsoft Word documents. The current problem is that during the import, the numbers change from Arabic to Hindu. This makes it impossible for Hebrew speaking users to read Microsoft Word documents which include numbers. See screenshots attached to issue #87625 (dup of #86811). As in Israel there is still a majority for Microsoft Office over Openoffice.org, this makes openoffice.org users isolated from getting documents from other people. This is the real reason for changing the bug priority to a higher one. Issue #86811 currently have 80 votes (and counting)… Some Linux users are even trying to convince their distributions to exclude version 2.4.0 from their coming release (See Ubuntu bug #210204 and Mandriva bug #38874). I personally think that this is wrong, as 2.4.0 should be included in the upcoming releases, but we should work hard to get 2.4.1 into those distributions when the fix for #86811 is ready. p.s. Hello planet openoffice.org (:

Lucas Nussbaum: Things you should know before buying an Asus EEE PC

I’ve been using an EEE PC since december, and people keep asking me if they should buy one. So here are some things you should know before making a decision. Screen The screen is small, but that’s OK. I couldn’t find many applications that didn’t work in 800×480. And for the remaining ones, you can usually use hacks such as running the app in a larger virtual desktop. Not ideal, but it works. Regarding usability, it’s not a too big problem. Jut expect to use many apps maximized, and use scrolling and virtual desktops a lot. (Important note: Xmoto doesn’t work!!) Keyboard The keyboard is probably a bigger problem than the screen (I hadn’t expected it to be a so big problem before buying the laptop). Every other keyboard seems to have HUGE keys after typing on the EEE PC keyboard. But with some training, you can type quite fast, even if probably not as fast as with a full size keyboard. The layout of the “special” keys is quite good (esp. the PgUp/Down, Home and End keys on the arrows. I should remap my other keyboard like that). Battery, power consumption One big problem with the EEE PC is that it consumes a lot of power while sleeping (using suspend to RAM). If you leave it sleeping for more than a few hours, expect the battery to be empty. That really sucks, especially since suspend to disk isn’t really a good option on such a device. Another problem related to power is that charging the battery is quite slow. SDHC card reader If you want to expand the storage capacity of your EEE PC with the SDHC port, choose your SDHC card carefully. There are only a few cards that work. The other ones will cause write error (they will work in read-only mode, so I’m using an external card reader to write, which sucks). A list of supported cards is available in the EEE PC manual. Random Q&A Q: I don’t have a laptop. Should I buy it? A: If you want to do a lot of real work on it, it’s probably not a very good idea. There are faster (but bigger) laptops at around 450-500 EUR. They are probably a much better option. The EEE PC is perfect as a the second laptop you only bring to places where you want to stay connected, read email and surf on the web (like conferences and meetings). Q: Does the VGA output works well? A: Yes. And it uses an Intel video card which works like a charm with xrandr. I already gave several presentations and classes using it. The laptop can output 1280×1024 (maybe 1600×1200, not sure). The only problem is that you will only have the top-left part of your slides on the laptop’s screen, because of the smaller resolution there. Annoying if you plan to read your slides.

Conclusion So, should you buy one? If you can’t wait, go ahead. If you can wait, it might be a good idea to wait until Asus fixes some of the problems (the SDHC card reader and the power consumption while sleeping are the most annoying ones).

Matt Brubeck: 2 Apr 2008

Flip Video Ultra on Linux My Flip video camera arrived yesterday, and I'm quite happy with it. It does everything it's supposed to: starts up fast, records and plays back through an astoundingly simple interface, and mounts as a USB mass storage device. The videos play back perfectly on my Ubuntu 7.10 system, and Kino can import and edit them if ffmpeg is installed. I did have some problems using the camera with a Windows XP laptop. The Windows program stored on the camera failed to start up, saying that "E:\SYSTEM\VIEWER\PD\settings\pathsInfo.txt does not contain a valid list." The firmware updater from the Flip web site failed with a similar error. Finally I found the Flip Video Program installer, which fixed both of those problems. (It took me a while to figure this out, so I'm documenting it here in case other Flip owners have the same problem.)

Julian Andres Klode: Python Extension for libisofs


I am working on a Python extension for the libisofs library. The extension is written in Cython , a Python-like language designed to write Python extensions. At a later point, this extension will be used to create the ISO Images in debimg. It will be disabled by default, but you can enable it via a configuration option.

Wouter Verhelst: nbd 2.9.10

I Just released NBD 2.9.10. It had been upcoming for a while already, with a few interesting patches being applied. In addition, some bugfixes were applied to subversion, and some more interesting things had happened. Really, a release was getting overdue. Sometimes life just intervenes. Anyway, apart from the upstream release, I of course also did a Debian update of these packages, which also contains some changes that had been pending for a while. Combined, the changelog mentions five different bugs of which none are l10n bugs, which is a record (there had been 5-bug uploads before, but those did include l10n bugs). On top of that, I closed some other outstanding bugs which really had been closed a while back, but either I forgot to close the bug, or I forgot that there even was a bug in the first place. I should stop slacking so much. While preparing this upload, it occurred to me that nbd has come a long way since I got involved with it back in 2001. The original nbd-server that Pavel Macheck had written did work well, but it was a bit of a hack; it did not fork() upon startup or anything similar, so starting it was a pain. It could only serve one device at a time. It was not documented. It had no concept of a configuration file. The code, frankly, was also bit of a mess; it was written on a hack night, and not much design had gone into it. I guess it was no surprise, then, that no single distribution had a package for nbd at the time. I only packaged it because I actually had some use for nbd; at the time, I'd just bought quickstep, my first functional m68k machine, and had installed Debian on its 250MB hard disk. However, running a buildd on that machine proved problematic, to say the least; with so little disk space, you could hardly boot Debian, and due to speed and clock skew issues, NFS was not an option. So I went with NBD, which worked great. After a while, quickstep got a bigger hard disk (it has an 18G disk today), so diskspace was less of an issue at that point; but, well, I'd been maintaining it already, and that was fun, so I didn't think of giving up. When Pavel lost interest in nbd back in 2003, he gave maintenance of the kernel bits to Paul Clements, and maintenance of the userspace bits to me. I promptly went ahead with what I thought should have been done already, but felt reluctant to do at the time to suggest that: refactoring the code, adding features, etc. Today, nbd-server does support all of the above things of which I mentioned it was lacking; and, probably as a result of that, apart from Debian, there are now packages of nbd in, at least, SuSE, Fedora, Gentoo, uClibc, and FreeBSD (the latter obviously only containing the server). Well—the fact that LTSP uses it might have something to do with it, too ;-) That's not to say there's nothing left to be done, but I'm quite happy about how far we've come. Really.

Vincent Fourmond: OOXML: Microsoft did win...

Bad news for the OpenSource/FreeSoftware community (or whatever you would wish to call it): ISO has just accepted Microsoft's Office Open XML file formats (see the suble alteration compared to a well known concurrent). Great. Even worse for me, it is apparently thanks to the French organization AFNOR. Fantastic. Now, we have two XML "office open document" formats accepted by ISO. That sounds so amazingly stupid that it's hard to believe... Just for information, the OpenDocument format, (the one from OpenOffice) has been accepted by ISO hardly more than a year ago !

Miriam Ruiz: ISO/IEC DIS 29500 (OOXML) is now an International Standard

Today is a sad day. Corruption has won over rationality. ISO sucks. I guess I lost all the trust I had on the standards organizations. OOXML is a standard covered by many patents, ambiguous enough for Microsoft to keep the real specs closed, far worse than the previous ISO standard for the same task (ODF), and approved in a very suspicious way, in a process full of irregularities, which I hope the European Union will investigate.

MJ Ray: Tour of Flanders

Bernie S wrote in: “Bit concerned RTBF not showing Flanders on Sunday (4 hrs last year). Only Eurosport (19 east) and RAI Tre (13 east) I can find so far. I just checked ARD/ZDF no deal there. Also France 3 said on Sunday at CI that Flanders is not live there. So, coverage is a bit sparse, although NOS will probably show but are encrypted.” Thanks Bernie. Eurosport is schedules show it as 13:00-17:00 CET and RAI Tre has it 15:10-18:00 CET (which probably means Eurosport will overrun and not show the presentations, as sadly usual). Unusually, it’s also on SFinfo (13 east) at 13:00 CET. Highlights 15:15 CET Monday and 13:30 CET Wednesday on Eurosport.

Francois Marier: Handling multiple identities/accounts in mutt

Since mutt seems to be all the rage these days at work, I might as well document here a few things about my .muttrc that might be useful to others.

(I recommend that you start off with the Debian or Ubuntu package for mutt since a large chunk of necessary customization work has already been done by the Debian maintainers.)

Here is how I handle two user accounts. Let's start off by listing both of these addresses so that mutt can recognize emails using these as being sent by me:
alternates "(fmarier@gmail\.com) (francois@debian\.org)"
Now this is to allow me to change the From address within the editor, in case I forgot to set the right one before pressing 'm':
set use_from
Here are the two settings that I'm going to change when switching to a different identity (from address and status bar display).
# default profile
set from="fmarier@gmail.com"
set status_format="-%r-fmarier@gmail.com: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---"
Here are the macros I use to switch from one account to the next (bound to ESC-1 and ESC-2):
macro index \e1 ":set from=fmarier@gmail.com\n:set status_format=\"-%r-fmarier@gmail.com: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---\"\n" "Switch to fmarier@gmail.com"
macro index \e2 ":set from=francois@debian.org\n:set status_format=\"-%r-francois@debian.org: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---\"\n" "Switch to francois@debian.org"
And this is the code that uses these macros to switch to the right identity automatically:
folder-hook =inbox 'push \e1oi'
folder-hook =debian-inbox 'push \e2oi'
(The 'oi' part at the end is there to restore the default sort order.)

Finally, I've got this convenient shortcut which allows me to switch to my inbox quickly and to go from one inbox to the next:
macro index I "c=inbox\n" "Switch to inbox"
folder-hook =inbox 'macro index I "c=debian-inbox\n" "Switch to debian-inbox"'
folder-hook =debian-inbox 'macro index I "c=inbox\n" "Switch to inbox"'
Next up: indexing your emails using mairix.

Martin F. Krafft: Adding proper IPv6 to my home network

Dear lazyweb: I claim to know quite a bit about the IPv6 theory, but I lack experience. I have a couple of hosts out there which are already properly IPv6-addressable and work, but I don t have a network scenario. Unfortunately, I also don t have a lot of time available for this right now. I was thus wondering if anyone of you knew of a document that explained the Debian way of I know of documents like Juliusz Getting IPv6 connectivity under Linux (linked from the Debian IPv6 project page, and of course the work by Peter Bieringer (with whom I ve worked previously), but I have not found a concise explanation of how to set it all up with minimal hacks on a Debian system. If noone has such a document, I might have to bite the bullet. Ping me if you want to cooperate. Let me know! NP: The Phoenix Foundation: Pegasus Update: From Waikato, Matt Brown sent this howto on 6to4. I sent back a small number of corrections and hope he ll incorporate them soon. On a related note, I am making good progress getting my Debian systems linked up to the future. I used the excellent SixXS tunnel broker to route 2^80 addresses to my home router and set up another tunnel to one of my native IPv6 hosts in the net. I also added 6to4 to two of my servers. This should give me enough for further experimentation, and eventually for netconf testing. I ve been keeping notes and you can expect a document with simple explanations for everything that I did. But before that, I want to get behind some kernel bugs related to netfilter, such as state INVALID matching valid packets in kernel 2.6.24 and before and conntrack failing to treat ICMP replies as RELATED with kernels 2.6.18 and 2.6.22. The latter seems fixed in 2.6.24, which isn t backported yet, but which we can expect to be in Etch-And-A-Half and Debian lenny. Stay tuned

1 April 2008

Russell Coker: SE Linux Play Machine and Passwords

My SE Linux Play Machine [1] has been online again since the 18th of March. On Monday the 11th of Feb I took it offline after a user managed to change the password for my own account (their comment was “ohls -lsa! i can change passwordls -lsals -lsa HACKED!“). Part of the problem was the way /bin/passwd determines whether it should change a password. The previous algorithm (and the one that is currently used in Debian/Etch) is that if the UID of the account that is having it’s password changed doesn’t match the UID of the process that ran /bin/passwd then an additional SE Linux check is performed (to see if it has permission to change other user’s passwords). The problem here is that my Play machine has root (UID==0) as the guest account, and that according to the /bin/passwd program there is no difference between the root account (for unprivileged users) and the bofh account (which I use and which also has UID==0). This means of course that users of the root account could change the password of my account. My solution to this was to run chcon on the /bin/passwd program to give it a context that denied it the ability to change a password. The problem was that I accidentally ran the SE Linux program restorecon (which restores file contexts to their default values) which allowed /bin/passwd to change passwords, and therefore allowed a user to change the password of my account. The semanage tool that allows changing the default value of a file context does not permit changing the default for a file specification that matches one from the system policy (so the sys-admin can’t override compiled in values). I have now fixed the problem (the fix is in my Etch SE Linux repository [2] and has been accepted for Debian/Unstable and something based on it will go into the upstream branch of Shadow. See the Debian bug report #472575 [3] for more information. The summary of the new code is that in any case where a password is not required to change the user’s password then SE Linux access checks will be performed. The long version is below: The new algorithm (mostly taken from the Red Hat code base which was written by Dan Walsh) is that you can only change a password if you are running as non-root (which means that the pam_unix.so code will have verified the current password) or if you are running as root and the previous SE Linux security context of the process is permitted access to perform the passwd operation in the passwd class (which means it is permitted to change other user’s passwords). The previous context (the context before one of the exec family of system calls was called) is used for such access checks because we want to determine if the user’s shell (or other program used to launch /bin/passwd) was permitted to change other user’s passwords - executing a privileged program such as /bin/passwd causes a domain transition and the context is different) than the program that was used to execute it. It’s much like a SETUID program calling getuid(2) to get the UID of the process which launched it. To get the desired functionality for my Play Machine I don’t want a user to change their own password as the account is shared. So I appended password requisite pam_deny.so to the file /etc/pam.d/passwd (as well as the chfn and chsh commands) so that hostile users can’t break things. The new code in /bin/passwd will prevent users from taking over the machine if my PAM configuration ever gets broken, having multiple layers of protection is always a good thing. The end result is that the Debian package and the upstream code base are improved, and my Debian Etch repository has the code in question.

Russell Coker: SE Linux Etch Repository for AMD64

My Etch back-port repository of SE Linux related packages (which I documented in a previous post [1]) now has a complete set of packages for AMD64. From now on I aim to make AMD64 and i386 be my main supported platforms for SE Linux development. There is a guy who may be able to give me a stack of well configured PowerMacs (2gigs of RAM), if he comes through with that then I may add PPC-32 to the list of architectures I support. If that happens then probably the machines will have their hard drives smashed for security reasons, so I’ll want to swap some G3 PowerMacs for hard drives.

Next.

Previous.