Search Results: "will"

26 July 2010

Russell Coker: Creating a SE Linux Chroot environment

Why use a Chroot environment? A large part of the use of chroot environments is for the purpose of security, it used to be the only way of isolating a user from a section of the files on a server. In many of the cases where a chroot used to be used for security it is now common practice to use a virtual server. Also another thing to note is that SE Linux provides greater access restrictions to most daemons than a chroot environment would so in many case using SE Linux with a sensible policy is a better option than using a chroot environment to restrict a daemon. So it seems to me that the security benefits that can be obtained by using a chroot environment have been dramatically decreased over the last 5+ years. One significant benefit of a chroot environment is that of running multiple different versions of software on one system. If for example you have several daemons that won t run correctly on the same distribution and if you don t want to have separate virtual machines (either because you don t run a virtualisation technology or because the resources/expense of having multiple virtual servers is unacceptable) then running multiple chroot environments is a reasonable option. The Simplest Solution The simplest case is when all the chroot environments are equally trusted, that means among many other things that they all have the latest security patches applied. Then you can run them all with the same labels, so every file in the chroot environment will have the same label as it s counterpart in the real root this will mean that for example a user from the real root could run /chroot/bin/passwd and possibly get results you don t desire. But it s generally regarded that the correct thing to do is to have a chroot environment on a filesystem that s mounted nosuid which will deal with most instances of such problems. One thing to note however is that the nosuid mount option also prevents SE Linux domain transitions, so it s not such a good option when you use SE Linux as domain transitions are often used to reduce the privileges assigned to the process. There are two programs for labeling files in SE Linux, restorecon is the most commonly used one but there is also setfiles which although being the same executable (restorecon is a symlink to setfiles) has some different command-line options. The following command on a default configuration of a Debian/Lenny system will label a chroot environment under /chroot with the same labels as the main environment: setfiles -r /chroot /etc/selinux/default/contexts/files/file_contexts /chroot I am considering adding an option to support chroot environments to restorecon, if I do that then I will probably back-port it to Lenny, but that won t happen for a while. For a simple chroot once the filesystem is labelled it s ready to go, then you can start daemons in the chroot environment in the usual way. Less trusted Chroot environments A reasonably common case is where the chroot environment is not as trusted. One example is when you run an image of an old server in a chroot environment. A good way of dealing with this is to selectively label parts of the filesystem as required. The following shell code instructs semanage to add file contexts entries for a chroot environment that is used for the purpose of running Apache. Note that I have given specific labels to device nodes null and urandom and the socket file log in the /dev directory of the chroot environment (these are the only things that are really required under /dev), and I have also put in a rule to specify that no other files or devices under /dev should be labelled. If /dev is bind mounted to /chroot/dev then it s important to not relabel all the devices to avoid messing up the real root environment and it s impractical to put in a specific rule for every possible device node. Note that the following is for a RHEL4 chroot environment, other distributions will vary a little some of the file names. semanage -i << END
fcontext -a -t root_t -f -d /chroot
fcontext -a -t bin_t /chroot/bin.*
fcontext -a -t usr_t /chroot/usr.*
fcontext -a -t usr_t /chroot/opt.*
fcontext -a -f -d /chroot/dev
fcontext -a -f -s -t devlog_t /chroot/dev/log
fcontext -a -f -c -t null_device_t /chroot/dev/null
fcontext -a -f -c -t urandom_device_t /chroot/dev/urandom
fcontext -a -t "<<none>>" "/chroot/dev/.*"
fcontext -a -t "<<none>>" "/chroot/proc.*"
fcontext -a -t lib_t /chroot/lib.*
fcontext -a -t lib_t /chroot/usr/lib.*
fcontext -a -t bin_t /chroot/usr/bin.*
fcontext -a -t httpd_exec_t -d /chroot/usr/bin/httpd
fcontext -a -t var_t /chroot/var.*
fcontext -a -t var_lib_t /chroot/var/lib.*
fcontext -a -t httpd_var_lib_t /chroot/var/lib/php.*
fcontext -a -t var_log_t /chroot/var/log.*
fcontext -a -t var_log_t -f /chroot/var/log/horde.log.*
fcontext -a -t httpd_log_t /chroot/var/log/httpd.*
fcontext -a -t var_run_t /chroot/var/run.*
fcontext -a -t httpd_var_run_t -f /chroot/var/run/httpd.pid
fcontext -a -t httpd_sys_content_t /chroot/var/www.*
END
You could create a shell script to run the above commands multiple times for multiple separate Apache chroot environments. If there is a need to isolate the various Apache instances from each other (as opposed to just protecting the rest of the system from a rogue Apache process) then you could start each copy of Apache with a different MCS sensitivity label which will provide adequate isolation for most purposes as long as no sensitivity label dominates the low level of any of the others. If you do that then the semanage commands require the -r option to specify the range. You could have one chroot environment under /chroot-0 with the sensitivity label of s0:c0 for it s files and another under /chroot-1 with the sensitivity label of s0:c1 for it s files. To start one environment you would use a command such as the following: runcon -l s0:c0 setsid chroot /chroot-0 /usr/sbin/httpd

25 July 2010

Russell Coker: Links July 2010

David Byrne gave an interesting TED talk about how changes to architecture drove changes to musical styles [1]. I think he does stretch the point a little. To a certain extent people develop the most complex instruments and the largest music halls that can be supported by the level of technology in their society people with a hunter-gatherer civilisation play drums because they can build them and can carry them. The NY Times has an interesting article about paternity leave in Sweden [2]. The Swedish government pays for a total of 13 months leave that can be split between parents for every child. Of those 13 months 2 months can only be taken by the father and that is likely to increase to a minimum of 4 months of paternity leave after the next election. Dan Meyer gave an interesting TEDX talk about how the current math curriculum in the US (as well as Australia and lots of other countries that do the same thing) is totally wrong [3]. His main point is that maths problems should be based on real-world use cases where not all needed data is immediately available and there is also useless data that must be discarded. He believes that the most important thing is developing mathematical problem solving skills basically the things that I did for fun when I was in primary school are skills that need to be taught to high-school students The Atlantic magazine has an amusing article by Daniel Byman and Christine Fair about the incompetent Islamic terrorists [4]. In Afghanistan half the suicide bombers kill only themselves and the US government has a lot of evidence of Taliban soldiers practicing bestiality and collecting porn. Islamic extremist groups are staffed by people who are bad soldiers and bad Muslims. Jon Masters wrote an interesting post titled What Would Jesus Buy about ethical purchasing decisions [5]. Jon references The Church of Stop Shopping which isn t a real religious organisation but a street theatre activist group. ZeroHedga has an insightful article comparing corporations and the US government to street gangs [6]. The conclusion is that when gangs take over a neighbourhood everyone has to join a gang for their own protection. Hillel Cooperman gave an interesting TED talk about being obsessed with Lego [7]. He compares Lego fans to Furries and makes a good case for this comparison. Marian Bantjes gave an interesting TED talk about her graphic art / graphic design work [8]. I ve never seen anything quite like this. Business Insider has an interesting article about oil cleanup, it seems that most people who worked on the Exxon Valdez disaster are now dead [9], s opposed to most people who worked in almost every other occupation at that time who are either still working or enjoying their retirement. The current gulf disaster is bigger, will require more workers for the cleanup, and can be expected to have a higher death toll. Some people claim that measures to reduce oil efficiency will impact the economy, how will millions of people who are chronically ill for the rest of their lives impact the economy? The NY Times has an interesting article on circle lenses [10], contact lenses designed to make the eyes look larger. It s illegal to sell contact lenses in the US without a prescription, but the latest trend is for women to buy them online in a variety of colors. The FDA should probably approve them, it would be better to have the quality controls you expect from a medical supply company instead of having people rely on Malaysian mail-order companies for the safety of their eyes. Don Marti has written an interesting article about the economic decline in the US, he suggests making pension funds invest in local jobs [11]. Companies are supposed to act on behalf of their stock-holders, but US companies often have the majority of their stock owned by the pension funds of workers but they act on behalf of a small number of rich people who own a minority of the stock. Don s article was inspired by Andy Grove s article in Bloomberg about the stagnation in technological development that has been caused by off-shoring the manufacturing [12]. Neil Brown has completed a test release of a new Linux software RAID feature for arrays with multiple redundancy that have bad sectors [13]. When a disk gets a bad sector the current behavior is to kick it out of the array, if you have two such errors on a 3 disk RAID-1 or a RAID-6 array then you lose all redundancy and are at risk of catastrophic failure even though in most cases both disks will still mostly work. With this patch some regions of the disk may be excluded but it can provide redundancy for other stripes. Thanks Neil for your great work here, and all your previous work over the last 10+ years! The RSPCA has a new campaign titled Close the Puppy Factories [14]. Dogs are kept in very poor conditions and forced to churn out puppies for their entire lives to supply pet stores. The RSPCA recommends that people buy puppies from registered dog breeders (not registered dog breeding companies ) and ask to see the dog s parents. They also recommend not buying from classified adverts or pet stores. Animal shelters have to euthenise huge numbers of unwanted animals, you can buy a pet dog or cat from an animal shelter for a small fee that covers the expenses related to housing and spaying it and save that animal from being euthenised! Maureen Dowd criticises the Catholic Church properly in an article for the New York Times [15]. The Catholic Church officially regards ordaining a woman and raping a child to be equally bad offenses. Frank Rich wrote an interesting column for the New York Times about Mel Gibson [16]. He describes the destruction of Mel Gibson s reputation as a symptom of changes in the culture in the US and also links it to the fall of Ted Haggard (who supported Gibson s most notorious movie The Passion of the Christ).

Joey Hess: git source packages: take 2

My patches to convert the 3.0 (git) source format to use git bundles have landed in dpkg's git repository and will be in dpkg 1.15.8. I think this second attempt at 3.0 (git) has worked out much better than the first. (Though the first was a pretty good success overall, since it also led all the other 3.0 formats eventually. ;) Perhaps the intervening years of git experience helped. The code is much simpler, with none of the ad-hoc hacks from the first version. The resulting git bundles can be manually cloned using git-bundle(1) where dpkg-source is not available. There are two handy new features that can be controlled by debian/source/options. git-ref can be used to limit the branches/tags/etc that are included in the source package. And git-depth can cause a shallow clone of specified depth to be created and bundled.
dpkg-source: info: using options from debhelper/debian/source/options: --git-ref=gitsrc --git-ref=master --git-depth=10
dpkg-source: info: using source format  3.0 (git)'
dpkg-source: info: creating shallow clone with depth 10
dpkg-source: info: bundling: gitsrc master
A demo source package is here.
joey@gnu:~/tmp/t>dget http://kitenet.net/~joey/tmp/debhelper_7.9.4.dsc
...
dpkg-source: info: extracting debhelper in debhelper-7.9.4
dpkg-source: info: cloning debhelper_7.9.4.git
dpkg-source: info: setting up shallow clone
joey@gnu:~/tmp/t>ls -l
total 392
drwxr-xr-x 10 joey joey   4096 Jul 25 13:58 debhelper-7.9.4/
-rw-r--r--  1 joey joey   1779 Jul 25 13:58 debhelper_7.9.4.dsc
-rw-r--r--  1 joey joey 388859 Jul 25 13:58 debhelper_7.9.4.git
-rw-r--r--  1 joey joey    738 Jul 25 13:58 debhelper_7.9.4.gitshallow
joey@gnu:~/tmp/t>cd debhelper-7.9.4 
joey@gnu:~/tmp/t/debhelper-7.9.4>git branch -a
* gitsrc
  remotes/origin/HEAD -> origin/gitsrc
  remotes/origin/gitsrc
  remotes/origin/master
Notice that the branch I was in when I built the package is preserved, and the 19 revisions included in the shallow clone (10 per branch) take up very little space of course. This particular git source package turned out 30k larger than the tar.gz. I am considering adding two other features: I hope the next step will be for git source packages to be accepted in the Debian archive.

Steve Kemp: My router serves Debian installer via gPXE

My Linksys router now serves the LAN with netboot images, allowing the simple installation of Debian GNU/Linux. I updated /etc/dnsmasq.conf on the router itself to read:
# gPXE sends a 175 option.
dhcp-match=gpxe,175
# serve the "undionly.kpxe" file by default.
dhcp-boot=net:#gpxe,undionly.kpxe
# which will then pull the config via HTTP
dhcp-boot=http://static.steve.org.uk/netboot/gpxe.cfg
Then placed /tftproot/undionly.kpxe in place on the router. This combination of files causes: I have only one problem - it seems that adding the expected entry to boot locally fails:
MENU TITLE Netboot
LABEL Local.Disk
   bootlocal 0
Update: After a fresh sleep and more trial and error I discovered this works:
LABEL Local.Boot
   KERNEL local/chain.c32
   APPEND -
It gives a temporary warning about invalid sector number - but actually does boot locally by default, on both my EEEPC and my desktop machine. If you want to snarf my netboot environment you are welcome to mirror : Why did I do this in the first place? I wanted to install Squeeze upon my EEEPC (now done.) ObQuote: Nice Cross. How'd you get the blood off? - Dead Like Me

Russell Coker: SE Linux status in Debian/Squeeze

ffmpeg I ve updated my SE Linux repository for Squeeze to include a modified version of the ffmpeg packages without MMX support for the i386 architecture. When MMX support is enabled it uses assembler code which requires text relocations (see Ulrich Drepper s documentation for the explanation of this [1]). This makes it possible to run programs such as mplayer under SE Linux without granting excessive access something which we really desire because mplayer will usually be dealing with untrusted data. In my past tests with such changes to ffmpeg on my EeePC701 have resulted in no difference to my ability to watch movies from my collection, the ones that could be played without quality loss on a system with such a slow CPU could still be viewed correctly with the patched ffmpeg. $ mplayer
mplayer: error while loading shared libraries: /usr/lib/i686/cmov/libswscale.so.0: cannot restore segment prot after reloc: Permission denied The AMD64 architecture has no need for such patches, presumably due to having plenty of registers. I don t know whether other architectures need such patches, they might the symptom is having mplayer abort with an error such as the above when running in Enforcing Mode. The below apt sources.list line can be used to add my SE Linux repository: deb http://www.coker.com.au squeeze selinux dpkg In my repository for i386 and AMD64 architectures I have included a build of dpkg that fixes bug #587949. This bug causes some sym-links and directories to be given the wrong label by dpkg when a package is installed. Usually this doesn t impact the operation of the system and I was unable to think of a situation where it could be a security hole, but it can deny access in situations where it should be granted. I would appreciate some help in getting the patch in a form that can be accepted by the main dpkg developers, the patch I sent in the bug report probably isn t ideal even though it works quite well someone who knows absolutely nothing about SE Linux but is a good C coder with some knowledge of dpkg could beat it into shape. In my repository I don t currently provide any support for architectures other than i386 and AMD64. I could be persuaded to do so if there is a demand. How many people are using Debian SE Linux on other architectures? Of course there s nothing stopping someone from downloading the source from my AMD64 repository and building it for another architecture, I would be happy to refer people to an APT repository that someone established for the purpose of porting my SE Linux packages to another architecture. Policy selinux-policy-default version 20100524-2 is now in Testing. It s got a lot of little fixes and among other things allows sepolgen-ifgen to work without error which allows using the -R option of audit2allow see my post about audit2allow and creating the policy for milters for defails [2]. I have uploaded selinux-policy-default version 20100524-3 to Unstable. It has a bunch of little fixes that are mostly related to desktop use. You can now run KDE4 on Unstable in enforcing mode, login via kdm and expect that everything will work probably some things won t work, but some of my desktop systems work well with it. I have to admit that not all of my desktop systems run my latest SE Linux code, I simply can t have all my systems run unstable and risk outages. Let me know if you find any problems with desktop use of the latest SE Linux code, it s the focus of my current work. But if you find problems with chrome (from Google) or the Debian package chromium-browser then don t report them to me. They each use their own version of ffmpeg in the shared object /usr/lib/chromium-browser/libffmpegsumo.so which has text relocations and I don t have time to rebuild chromium-browser without text relocations I ll make sure it does the right thing when they get it working with the standard ffmpeg libraries. That said the text relocation problem doesn t seem to impact the use of Chromium, Youtube doesn t work even when the browser is run in permissive mode. GNOME is a lower priority than KDE for me at this time. But the only area where problems are likely to occur is with gdm and everything associated with logging in. Once your X session starts up GNOME and KDE look pretty similar in terms of access control. I would appreciate it if someone could test gdm and let me know how it goes. I ll do it eventually if no-one else does, but I ve got some other things to fix first.

Thorsten Glaser: FrOSCon 2010 ( Birthday FrOSCon ) approaching

FrOSCon 5 - 21./22. August 2010 is approaching rapidly. I m a bit envious at some of the tracks (I mean, really, geocaching (ok, I did the surrounging caches over the last years but still), learning python by means of game programming, etc. really sounds interesting and I know people who could benefit from a non-kids version of that as well) but this year s FrOSCon is nothing for me to curse about either: I managed to get both a booth for The MirOS Project (MirBSD, mksh and other subprojects) as well as one for Waldemar s FreeWRT (although wbx@ if he comes won t join there since he forked his own fork since its conception). Booth staff are, currently: tg@ and bsiegert@ (Developer), gecko2@ (Staff) for MirOS, tg@ and XTaran abe@ (Developer), kimnotyze (Hacker) for FreeWRT. (XTaran will probably be helping Debian/Grml too.) This year, it ll be my job (after 2 years of aptituz) to keep the Altbier-Fraktion watered, I m thinking one crate of Schl sser Alt and one crate of Hannen Alt? Have a look at the Program and don t tell me you won t come! It will rock! (Except there won t be Formorer s Chilli, but that s no reason, there s enough other stuff in manageable distance.) Besides interesting booths and talks, FrOSCon is still looking for helpers who will not only get free entrance but also catering during operation.

Petter Reinholdtsen: One step closer to single signon in Debian Edu

The last few months me and the other Debian Edu developers have been working hard to get the Debian/Squeeze based version of Debian Edu/Skolelinux into shape. This future version will use Kerberos for authentication, and services are slowly migrated to single signon, getting rid of password questions one at the time. It will also feature a roaming workstation profile with local home directory, for laptops that are only some times on the Skolelinux network, and for this profile a shortcut is created in Gnome and KDE to gain access to the users home directory on the file server. This shortcut uses SMB at the moment, and yesterday I had time to test if SMB mounting had started working in KDE after we added the cifs-utils package. I was pleasantly surprised how well it worked. Thanks to the recent changes to our samba configuration to get it to use Kerberos for authentication, there were no question about user password when mounting the SMB volume. A simple click on the shortcut in the KDE menu, and a window with the home directory popped up. :) One step closer to a single signon solution out of the box in Debian Edu. We already had PAM, LDAP, IMAP and SMTP in place, and now also Samba. Next step is Cups and hopefully also NFS. We had planned a alpha0 release of Debian Edu for today, but thanks to the autobuilder administrators for some architectures being slow to sign packages, we are still missing the fixed LTSP package we need for the release. It was uploaded three days ago with urgency=high, and if it had entered testing yesterday we would have been able to test it in time for a alpha0 release today. As the binaries for ia64 and powerpc still not uploaded to the Debian archive, we need to delay the alpha release another day. If you want to help out with implementing Kerberos for Debian Edu, please contact us on debian-edu@lists.debian.org.

Stefano Zacchiroli: RCBC - release critical bugs contest

Recipe for RCBC - Release Critical Bug squashing Contest:
squash RC bugs for 2 weeks , from July 25th to August 7th
help the release of Debian Squeeze
earn fame and glory (for sure)
win a GuruPlug and other geeky gadgets (maybe)
read on for more info ...
It has been a while since my last post in the RCBW tradition. Luckily, the tradition is in very good health of its own, thanks to many others that have picked up the habit of SPAM-ing planet with good news for Debian, encouraging others to do the same. With all that RC-obsessed people around and with the Squeeze release forthcoming, can DebConf10 be devoid of geeky RC-squashing activities? Of course not! Thanks to the orga team we expect the conference to contain a 2-week long RC bug squashing pride with tutorials, BoFs, a permanent bug squashing party, ... and a contest! I won't indulge much on the contest as the wiki page contains all rules and gory details. Obviously, all usual rules and best practices of bug squashing parties will apply; coordination will happen on #debian-bugs. Get involved, it starts today, and it's open to everyone (DebConf10 attendees as well as Debian enthusiasts abroad, regular RC squashers as well as casual bystanders, etc). All this wouldn't have been possible without the help of many people that love Debian, so many thanks to: PS a corresponding announcement is in the debconf-announce pipeline already

Russell Coker: SE Linux audit2allow -R and Milter policy

Since the earliest days there has been a command named audit2allow that takes audit messages of operations that SE Linux denied and produces policy that will permit those operations. A lesser known option for this program is the -R option to use the interfaces from the Reference Policy (the newer version of the policy that was introduced a few years ago). I have updated my SE Linux repository for Lenny [1] with new packages of policy and python-sepolgen that fix some bugs that stopped this from being usable. To use the -R option you have to install the selinux-policy-dev package and then run the command sepolgen-ifgen to generate the list of interfaces (for Squeeze I will probably make the postinst script of selinux-policy-dev do this). Doing this on Lenny requires selinux-policy-default version 0.0.20080702-20 or better and doing this on Debian/Unstable now requires selinux-policy-default version 0.2.20100524-2 (which is now in Testing) or better. Would it be useful if I maintained my own repository of SE Linux packages from Debian/Unstable that can be used with Debian/Testing? You can use preferences to get a few packages from Unstable with the majority from Testing, but that s inconvenient and anyone who wants to test the latest SE Linux stuff would need to include all SE Linux related packages to avoid missing an important update. If I was to use my own repository I would only include packages that provide a significant difference and let the trivial changes migrate through Testing in the normal way. The new Lenny policy includes a back-port of the new Milter policy from Unstable, this makes it a lot easier to write policy for milters. Here is an example of the basic policy for two milters, it allows the milters (with domains foo_milter_t and bar_milter_t) to start, to receive connections from mail servers, and to create PID files and Unix domain sockets. policy_module(localmilter,1.0.0)

milter_template(foo)
files_pid_filetrans(foo_milter_t, foo_milter_data_t, sock_file file )

milter_template(bar)
files_pid_filetrans(bar_milter_t, bar_milter_data_t, sock_file file )
allow bar_milter_t self:process signull;
type bar_milter_tmp_t;
files_tmp_file(bar_milter_tmp_t)
files_tmp_filetrans(bar_milter_t, bar_milter_tmp_t, file)
manage_files_pattern(bar_milter_t, tmp_t, bar_milter_tmp_t) After generating that policy I ran a test system in permissive mode and sent a test message. I ran audit2allow on the resulting AVC messages from /var/log/audit/audit.log and got the following output: #============= bar_milter_t ==============
allow bar_milter_t bin_t:dir search;
allow bar_milter_t bin_t:file getattr;
allow bar_milter_t home_root_t:dir search;
allow bar_milter_t ld_so_cache_t:file read getattr ;
allow bar_milter_t lib_t:file execute;
allow bar_milter_t mysqld_port_t:tcp_socket name_connect;
allow bar_milter_t net_conf_t:file read getattr ioctl ;
allow bar_milter_t self:process signal;
allow bar_milter_t self:tcp_socket read write create connect setopt ;
allow bar_milter_t unlabeled_t:association recvfrom sendto ;
allow bar_milter_t unlabeled_t:packet recv send ;
allow bar_milter_t urandom_device_t:chr_file read;
allow bar_milter_t usr_t:file read getattr ioctl ;
allow bar_milter_t usr_t:lnk_file read;
#============= foo_milter_t ==============
allow foo_milter_t ld_so_cache_t:file read getattr ;
allow foo_milter_t lib_t:file execute;
allow foo_milter_t mysqld_port_t:tcp_socket name_connect;
allow foo_milter_t net_conf_t:file read getattr ;
allow foo_milter_t self:capability setuid setgid ;
allow foo_milter_t self:tcp_socket write setopt shutdown read create connect ;
allow foo_milter_t unlabeled_t:association recvfrom sendto ;
allow foo_milter_t unlabeled_t:packet recv send ; Running the audit2allow command with the -R option gives the following output, it includes the require section that is needed for generating policy modules:
require
type sshd_t;
type ld_so_cache_t;
type bar_milter_t;
type foo_milter_t;
class process signal;
class tcp_socket setopt read create write connect shutdown ;
class capability setuid setgid ;
class fd use;
class file read getattr ;

#============= bar_milter_t ==============
allow bar_milter_t ld_so_cache_t:file read getattr ;
allow bar_milter_t self:process signal;
allow bar_milter_t self:tcp_socket read write create connect setopt ;
corecmd_getattr_sbin_files(bar_milter_t)
corecmd_search_sbin(bar_milter_t)
corenet_sendrecv_unlabeled_packets(bar_milter_t)
corenet_tcp_connect_mysqld_port(bar_milter_t)
dev_read_urand(bar_milter_t)
files_read_usr_files(bar_milter_t)
files_read_usr_symlinks(bar_milter_t)
files_search_home(bar_milter_t)
kernel_sendrecv_unlabeled_association(bar_milter_t)
libs_exec_lib_files(bar_milter_t)
sysnet_read_config(bar_milter_t)
#============= foo_milter_t ==============
allow foo_milter_t ld_so_cache_t:file read getattr ;
allow foo_milter_t self:capability setuid setgid ;
allow foo_milter_t self:tcp_socket write setopt shutdown read create connect ;
corenet_sendrecv_unlabeled_packets(foo_milter_t)
corenet_tcp_connect_mysqld_port(foo_milter_t)
kernel_sendrecv_unlabeled_association(foo_milter_t)
libs_exec_lib_files(foo_milter_t)
sysnet_read_config(foo_milter_t) To get this working I removed the require lines for foo_milter_t and bar_milter_t as it s not permitted to both define a type and require it in the same module. Then I replaced the set of tcp_socket operations write setopt shutdown read create connect with create_socket_perms as it s easiest to allow all the operations in that set and doesn t give any security risks. Finally I replaced the mysql lines such as corenet_tcp_connect_mysqld_port(foo_milter_t) with sections such as the following:
mysql_tcp_connect(foo_milter_t)
optional_policy(
mysql_stream_connect(foo_milter_t)
) This gives it all the access it needs and additionally the optional policy will allow Unix domain socket connections for the case where the mysqld is running on localhost.

24 July 2010

Sune Vuorela: debconf kde frontend

I wrote another blog post a while back talking about Debconf kde frontend. I spend some days at akademy looking at it, and then refined it a bit when I got home.
Results: debconf kde frontend in action. hopefully, the debconf people will accept it soon.

Dirk Eddelbuettel: useR 2010 at NIST in Gaithersburg

This past week, the annual R user conference useR! 2010 took place at the National Institute of Standards and Technology (NIST) in Gaithersburg, MD (which is a tad northwest of Washington, DC). Kate Mullen and her team of local organizers did a truly tremendous job in putting together a very smooth conference attended by almost 500 people. It is always nice to meet so many other R contributors and users in person. And needless to say it's also just plain fun to hang out with these folks. As at the preceding useR! 2008 in Dortmund and useR! 2009 in Rennes, I presented a three-hour tutorial on high-performance computing with R. This covers scripting/automation, profiling, vectorisation, interfacing compiled code, parallel computing and large-memory approaches. The slides, as well as a condensed 2-up version, are now on my presentations page. On Wednesday, Romain and I had a chance to talk about recent work on Rcpp, our R and C++ integration. Thursday, we followed up with a presentation on RProtoBuf -- a project integrating Google's Protocol Buffers with R which much to our delight already seems to be in use at Google itself! It was quite fun to do these two talks jointly with Romain. But my other coauthor Khanh had to be at a conference related to his actual PhD work. So on Friday it was just me to give a presentation about RQuantLib which brings QuantLib to R. Slides from all these talks have now been added to my presentations page. I will also upload them via the conference form so that they can be part of the conference's collection of presentations which should be forthcoming.

Biella Coleman: Silent Cry for Help: Debconf Volunteers



silent-cry-for-help, originally uploaded by the biella.
Hi Debcamper s and Debconfer s. I am currently coordinating volunteers and can use your help! Here is a list of our current and most pressing volunteer needs. If you are interested in volunteering and know what you would like to do, drop me a line with details. If you are interested in volunteering and are up for anything, drop me a line. If you want to volunteer but can only spare a couple of hours, drop me a line! You can reach me at biella(at)nyu.edu We are most in need of finding help for the front desk and for assisting with the talks (starting/ending on time and fielding questions). This year if you are a coordinator for a track you will be in charge of doing this, so we only need volunteers for non-track talks. Volunteers get a free, volunteer tee-shirt and a huge huge thanks from the orga team who simply cannot do this without you!

Biella Coleman: Silent Cry for Help: Debconf Volunteers



silent-cry-for-help, originally uploaded by the biella.
Hi Debcamper s and Debconfer s. I am currently coordinating volunteers and can use your help! Here is a list of our current and most pressing volunteer needs. If you are interested in volunteering and know what you would like to do, drop me a line with details. If you are interested in volunteering and are up for anything, drop me a line. If you want to volunteer but can only spare a couple of hours, drop me a line! You can reach me at biella(at)nyu.edu We are most in need of finding help for the front desk and for assisting with the talks (starting/ending on time and fielding questions). This year if you are a coordinator for a track you will be in charge of doing this, so we only need volunteers for non-track talks. Volunteers get a free, volunteer tee-shirt and a huge huge thanks from the orga team who simply cannot do this without you!

Chris Lamb: Four men in a mine

kumbunterland posed this question in the park yesterday:
There are four men in a coal mine. This exit is narrow so that no more than 2 men can exit at the same time. In addition, there is only one torch and they can't leave the mine without it. Each man walks at a different speed. The first man takes one minute to exit the mine the bridge distance, the second takes two minutes, the third takes five, and the fourth takes eight minutes. If two men walk together they must walk at the slower speed. For example, if person #1 and person #3 go together, they will leave the mine in 5 minutes. Then, person #1 could return back to return the torch to the others (taking another one minute) so they can use it to exit again. The coal mine will collapse in exactly 15 minutes; you must find a way to allow all the men to leave the mine within this time.
Unfortunately, swi-prolog is broken on the N900, so I wasn't able to solve it right then:
solution(Men, Bound, Out) :-
    torchInside(Men, [], [], Log),
    totalDuration(Log, 0, Duration), Duration =< Bound,
    swritef(Out, '%w  (%w minutes)', [Log, Duration]).
% We use torch Inside,Outside  predicates like a state machine.
torchInside(A, B, Log, X) :-
    % Move two people from inside -> outside the mine
    combination(2, A, S), subtract(A, S, A1), append(S, B, B1),
    torchOutside(A1, B1, [S Log], X).
torchOutside([], _, Log, Log).
torchOutside(A, B, Log, X) :-
    % Move someone from outside -> inside the mine
    combination(1, B, S), subtract(B, S, B1), append(S, A, A1),
    torchInside(A1, B1, [S Log], X).
% Utilities:
totalDuration([], X, X).
totalDuration([H T], Acc, X) :-
    max_list(H, Max), NewAcc is Acc + Max,
    totalDuration(T, NewAcc, X).
combination(0, _, []).
combination(N, [H T], [H Comb]) :-
    N > 0, N1 is N - 1, combination(N1, T, Comb).
combination(N, [_ T], Comb) :-
    N > 0, combination(N, T, Comb).
?- solution([1, 2, 5, 8], 15, X).
X = "[[2, 1], [2], [5, 8], [1], [1, 2]]  (15 minutes)" ;
X = "[[1, 2], [1], [5, 8], [2], [1, 2]]  (15 minutes)" ;
false.
I'm fun at parties.

23 July 2010

Joey Hess: Flattr FOSS

Raphael's Flattr FOSS is a good idea: Make it really easy for users to pay tips for free software and maybe users who otherwise wouldn't express their appreciation will. I've added Flattr buttons for a few of my Free Software packages. Am interested to see how it works out.
Flattr this
Regarding Flattr itself, I have always wanted a way to easily micropay artists, coders, etc online. Especially musicians like Mosaik! The way it splits your monthly payment amoung everyone you've Flattr'd that month is smart; it takes money out of the picture when deciding whether to click on a Flattr button. I think it would be more honest, though, if rather than taking 10% of everything (which would be just absurd and indefensible if this were used on a large scale, and whiffs faintly of pyramid scheme even now), Flattr took one share of your monthly payment (as if you automatically Flattr'd them each month). That would provide even more incentive to Flattr lots of other things. And if lots of people were Flattring lots of things, Flattr would still make plenty of money.

Steve Kemp: I'm a CPAN author.

As of this morning I'm a published author on CPAN! Thus far I have only a single module to my name, but that will most likely change in the future:
CGI::Session::Driver::redis
A module for storing (CGI) session data within a Redis database.
A while back I setup a dynamic website which was 100% redis backed, using my redis backports for lenny, and realised I needed somewhere to store the session data too. Hence this module. I'll create a .deb package of the module, and stick it alongside the redis server. ObQuote:I like to keep this handy... for close encounters.

Aliens

Christian Perrier: Bug #590000

Joe Hansen reported the Debian bug #590000 on Thursday July 22nd, against the uif package. Guess what? That was a localization bug..:-)... Joe is doing a lot of work for Danish localization in Debian since a few months and I'm happy to see him rewarded byt this little "success". Bug #580000 was reported as of May 2nd. It is now confirmed that the rate for 10,000 bugs is more 2.5 months than 2 months as it was in the past. So, now my next post about this topic will be about Bug #600000 for which a bet was placed two years ago. I already lost the bet as I predicted it to happen on June 30th. Either Ren Mayorga or Josu Abarca are likely to win this bet, more likely Ren , I would say. One should note that all people who did bet where optimistic about the moment where bug #600000 would be reported.

22 July 2010

Steve Kemp: My Linksys router now runs Linux and almost provides PXE.

I've been interesting in running Linux upon my router for a long time, but I never had a really compelling reason to do so. The potential for brickage was always too high to make me want to experiment for the sake of it. However last night I installed Gargoyle upon my Linksys WRT53GL. Although I have no single compelling reason to do so there were a few things on my mind which made me risk it:
Syslog
I thought it would be nice to log things to my desktop machine.
QoS
I often run rsync to mirror my photographs, videos, and files, to off-site locations. These are then replicated via chironfs. Being able to use QoS to prioritise SSH traffic, which is the transport I use for rsync, means I don't suffer from laggy connections.
Graphing & Statistics
Having statistics and traffic information is interesting.
Since I've only just installed it I've not had too much opportunity to experiment with it - and my initial forays were not so productive. For example "opkg install tcpdump" failed as the root filesystem wasn't big enough. However which was to update the router to function as PXE server. I installed the tftpd server:
opkg install tftpd-hpa
Then I added this to /etc/dnsmasq.conf:
dhcp-boot=pxelinux.0,router.my.flat,192.168.1.1
Only after I'd done this did I realise two things: Tomorrow, (after visiting the dentist. Uggh) I will experiment with this further. Right now it looks like I have two options: Either way I have to store the files upon another host, due to the constrained space on the router's filsystem. So the question becomes "Which service should I run externally: TFPTD or NFS?". Running TFTPD, upon my desktop, seems smaller, less of a security risk, and neater. Running TFTPD also avoids issues if I reboot both the router and my desktop at the same time as a stalling NFS mount could prevent a timely router-boot. ObQuote: Looking for a secret door. Places like this always have a secret door.

- St Trinian's 2: The Legend of Fritton's Gold

Rapha&#235;l Hertzog: Quick news: dpkg, collab-maint, alioth and the future

Dpkg got rid of Perl Let s start with the interesting part and the great news: dpkg 1.15.8 (to be uploaded soon) will no longer need perl! After my changes to rewrite update-alternatives in C, Guillem recently pushed the rewrite of dpkg-divert/mksplit in C. Please test it out (binary package for i386 or .dsc). This is rather exciting news for those who would like to use dpkg in embedded contexts. And it s great to see this completed in time for Squeeze. In Squeeze+1, we might go one step further and merge cdebconf, the C replacement for debconf. I got rid of some recurring administrative tasks I have been administrating the Alioth server since its inception (see the announce I sent in 2003) but I m no longer enjoying the day-to-day administrative work that it represents. That s why I just retired from the team. We recently recruited Tollef Fog Heen so the number of admins is still the same (that said, Alioth could benefit from some more help, if you re a DD and interested, drop a mail to admin@alioth.debian.org or come to #alioth). Same goes for the collab-maint project. I have dealt with hundreds of requests to add new contributors to the project since it s the central repository where all Debian developers have write access and where they put the VCS for their packages that do not belong to a more specialized team. The new administrator that will approve the requests is Xavier Oswald and he s doing the work under the umbrella of the New Maintainer s Front Desk. The future I will continue to spend the same amount of time on Debian, the time freed will quickly be reallocated to other Debian and free software related projects. In fact, I even anticipated a bit by launching Flattr FOSS last week but that s a relatively simple project. :-) The other projects that will never all fit in the freed time: I want to spend more time working on dpkg. I do plan to blog more often too, but I m sure you ll notice that yourself soon. I would like to see my Debian book translated into English (another post coming on the topic sometimes soon). In my dreams, I could even start yet another software project, I have some ideas that I really would like to see implemented but I don t see how that could fit in this year s planning unless I can convince someone else to implement them! Maybe I should blog about them. Flattr this Share/Bookmark 5 comments Support my work

Stefano Zacchiroli: debian podcast planning

This Week In Debian I've been contacted by Jonathan Nadeau of Frostbite Systems, a company selling computer hardware with pre-installed GNU/Linux distros, including Debian (of course!). (Usual disclaimer applies: I haven't tried their products, I've just skimmed through their website ...) Both for promotion and as a service to the communities, Jonathan has started various podcasts, such as This Week in Fedora. Jonathan has contacted me to check whether Debian is interested in having a This Week in Debian podcast, which will be discussing weekly Debian-related topics, interviewing at each episode someone from the community. So, folks, are you interested in seeing that happen?
Personally I like the idea, as I'm myself an eager podcast listener and I've always missed something Debian-specific. To make it a reality however we need to plan and record some episode in advance, to ensure the podcast will have enough "buffer" to start. That's why I've created the ThisWeekInDebian wiki page, where interested people should drop a line, proposing a topic and volunteering to speak about it. Any Debian-related topic is a good candidate: a team, an initiative, a general discussion about a relevant project aspect, etc. You don't even need any particular upfront preparation, as it'll be interview-like. So, what are you waiting for? Drop a line to the wiki page. Jonathan will attend DebConf10 so, in case you are attending, that can be a nice occasion to record some episode in person (otherwise recordings usually happen over the net).

Next.

Previous.