Bartosz Feński: burp 1.3.6
Enjoy burp 1.3.6 in unstable!
Enjoy burp 1.3.6 in unstable! Its like 2.5.7, only with less false positives and no FTBFS.Especially people annoyed by the hardening flags will hopefully find that 2.5.8 greatly reduces the number of false positives. I believe this is best demonstrated with an example:
$ lintian --print-version && lintian -q -C binaries amarok_2.5.0-1_i386.deb wc -l 2.5.7 94 [...] $ lintian --print-version && lintian -q -C binaries amarok_2.5.0-1_i386.deb wc -l 2.5.8 4However, nothing comes for free. We dropped hardening-no-stackprotector from the default profile (and demoted it to an I tag). For hardening-no-fortify-functions we made a false positive -> false negative trade-off by ignoring binaries if their only unprotected function is memcpy. For more information, please refer to #673112. hardening-no-stackprotector is still available and can be used via the debian/extra-hardening profile (or via the tags argument). For the 2.5.7 behaviour of hardening-no-fortify-functions, you have to use hardening-check directly. But 2.5.7 had other changes besides the myriad of false-positives:
$ lintian --tags build-depends-on-obsolete-package a2ps_4.14-1.1.dsc E: a2ps source: build-depends-on-obsolete-package build-depends: dpatch $ cat ~/.lintian/profiles/local/main.profile Profile: local/main Extends: debian/main $ cat ~/.lintian/vendors/local/main/data/fields/obsolete-packages @include-parent @delete dpatch bison $ lintian --profile local/main --tags build-depends-on-obsolete-package a2ps_4.14-1.1.dsc E: a2ps source: build-depends-on-obsolete-package build-depends: bison $It is a toy example, but I believe it is a good demonstration of the feature. The full documentation of Vendor specific data files can be found in the Lintian User manual (in lintian/2.5.7 or newer). It will also be on lintian.debian.org when we find time to update lintian there.
Android support in Gammu is one of frequently requested features. I don't have neither time to motivation to do that, so unless somebody else will step up, it won't be done.
Recently, I got offer from MyPhoneExplorer author to share it's
applet for communicating with Android phones. It basically provides
protocol similar to Sony-Ericsson phones Gammu already supports, just
over TCP/IP. So all what would have to be done is glue layer for using
TCP/IP and possibly some minor adjustments to Sony-Ericsson code. Both
of these should be quite easy tasks and I'm willing to guide you
through this process.
In case anybody would be interested in this challenge, just let me
know :-).
Filed under: English Gammu 1 comments Flattr this!
The past few weeks have consisted of a heady mixture of taking interesting pictures of cute people, and writing code.
I spent a while getting to grips with seccomp filters, using the facilities present in recent GNU/Linux Kernels to filter system calls binaries are allowed to make.
My initial test was to patch GNU Less to only allow it to open, read, and close files. The side-effect of this was that the built in shell-escape was closed, thus allowing me to test it.
After that I toyed around with interfacing with spidermonkey seamonkey. In this regard I was less succesful, but I did manage to write code in C that would invoke javascript functions loaded dynamically. Similarly I could call from my (loaded) javascript code into functions defined in C.
I don't have a use for a Javascript to/from C bridge, but I'm sure that time will come.
Photography has been a constant distraction, I took some
fun shots of the Edinburgh Marathon, and then distracted myself with
a volunteer to take an abstract
fishnet photograph. We went on to do some more fun shots begin
careful to stay on the safe side of the NSFW limit. I think this is borderline NSFW, but we were both clear exactly what we wanted and we got it perfectly there.
Next week will be quieter, but providing we don't have another mini-heatwave in Edinburgh I'll be cheerful regardless.
ObQuote: One, two, Freddy's coming for you. - A Nightmare on Elm Street (original)
As we are getting closer to the World IPv6 Day, I thought that I'd see if I can upgrade my WRT54GL's OpenWRT (White Russian) installation to accept Router Adverts from the ISP to acquire an IPv6 address (rather than via a 4-to-6 tunnel broker, which seems to be the most documented case), and to propagate its IPv6 address space to my local network via my WRT45GL's radvd. Unfortunately, most of the instructions out there concern newer OpenWRT releases to which I cannot upgrade to because their software base takes up significantly more space than White Russian does. Still, I figure that someone in the community must have already succeeded at configuring their WRT54GL for this and might be able to help. Anyone? :)
Multiarch has been coming RSN for an extremely lengthy meaning of the word "soon". I remember watching Tollef give a presentation about it at DebConf4 and I'm pretty sure it's been talked about at every DebConf since then as well. Deemed the "correct" answer to the issue of running i386 binaries on x86_64 machines, or old ARM ABI programs on more modern hardware, it's always seemed to be at least another Debian release away.
Not so anymore. Through foolishness I ended up buying a Brother HL3040CN when I first moved to the US. It was a cheap networked laser printer and it touted Linux support. Quality wise it's been fine. I don't use it a lot, but unlike an inkjet I don't have to worry about not using it for a month and then needing to print something in a hurry and having to clean print heads etc. Where it falls down is that I failed to check that "Linux support" involved source. No. Instead it involves an i386 binary (at least packaged as a .deb, but in a horrible fashion). Up until now I've mostly been printing from my laptop, so all the drivers are installed there. I've got some guests this week and they needed to print their boarding passes, so I decided it was time to make the house server act as a print server too. It's an AMD64 box and before now I haven't had any need to run i386 code on it, so when I installed the driver deb it failed to work. Normally I'd just install ia32-libs, but this time I decided to try multiarch. So I did:
# dpkg --add-architecture i386
# apt-get update
# apt-get install libc6:i386
and magically I was now able to run the printer driver binary. I know there's a lot more work still to be done (I need to check if I can ditch ia32-libs on my laptop which runs a few more i386 only apps), but this is pretty cool - thanks to all those involved in making it happen!
Update: I tried to install all the multiarch bits required for Skype on my laptop but hit an issue with libqtgui4:i386 which ends up pulling in liblcms1:i386 which isn't yet multiarch enabled. There was already a bug, #637732 filed by vorlon, and mhy did the appropriate NMU a week ago, so it should hopefully hit testing in the next week. Thanks guys.
NetSNMP comes with its own event loop based on the select()
system call. While you can build your program around it, you may
prefer to use an existing event loop, either a custom one or something
like libevent, libev or Twisted.
select(), poll(), epoll(),
kqueue() or something similar. All those functions take a set of
file descriptors and wait for any of them to become available in a
specified time frame.
Here is a typical use of select() (adapted from Quagga)
readfd = m->readfd; writefd = m->writefd; exceptfd = m->exceptfd; timer_wait = thread_timer_wait (&m->timer); num = select (FD_SETSIZE, &readfd, &writefd, &exceptfd, timer_wait); if (num < 0) if (errno == EINTR) continue; /* signal received - process it */ zlog_warn ("select() error: %s", safe_strerror (errno)); return NULL; if (num == 0) /* Timeout handling */ thread_timer_process (&m->timer); if (num > 0) thread_process_fd (&readfd); thread_process_fd (&writefd);
thread_process_fd (fds) function iterates on each file descriptor
fd and executes the appropriate action if FD_ISSET (fds, fd) is true.
Integrating NetSNMP into such an event loop is easy: NetSNMP
provides the snmp_select_info() function which alters a set of file
descriptors to insert its own. Here is the new code:
#if defined HAVE_SNMP struct timeval snmp_timer_wait; int snmpblock = 0; int fdsetsize; #endif /* ... */ #if defined HAVE_SNMP fdsetsize = FD_SETSIZE; snmpblock = 1; if (timer_wait) snmpblock = 0; memcpy(&snmp_timer_wait, timer_wait, sizeof(struct timeval)); snmp_select_info(&fdsetsize, &readfd, &snmp_timer_wait, &snmpblock); if (snmpblock == 0) timer_wait = &snmp_timer_wait; #endif num = select (FD_SETSIZE, &readfd, &writefd, &exceptfd, timer_wait); if (num < 0) /* ... */ #if defined HAVE_SNMP if (num > 0) snmp_read(&readfd); else if (num == 0) snmp_timeout(); run_alarms(); netsnmp_check_outstanding_agent_requests(); #endif /* ... */
snmp_select_info() may modify the provided set of file descriptors
(and therefore, its size). It may also modify the provided timer in
case it needs to schedule an action before the original timeout.
snmpblock is a tricky variable. While select() can be called with
a timeout set to NULL, this is not the case of snmp_select_info():
you have to pass a valid pointer. snmpblock is set to 0 if the
provided timeout must be considered or to 1
otherwise. snmp_select_info() will set snmpblock to 0 if and only
if it alters the timeout.
Here are a two examples of integration. Both are for a subagent but
the code for a manager is the same:
select()
system call anymore. Therefore, you cannot alter it with
snmp_select_info(). Instead, at each iteration of the loop, a list
of SNMP related file descriptors is kept up-to-date with the help of
snmp_select_info(): new ones are added and old ones are removed.
snmp_fds is the list of current SNMP related
events1. A function levent_snmp_update() calls
snmp_select_info() to update this list. Here is a partial
implementation (error handling removed and some declarations omitted,
look at the
complete version
from lldpd):
static void levent_snmp_update() int maxfd = 0; int block = 1; FD_ZERO(&fdset); snmp_select_info(&maxfd, &fdset, &timeout, &block); /* We need to untrack any event whose FD is not in fdset anymore */ for (snmpfd = TAILQ_FIRST(snmp_fds); snmpfd; snmpfd = snmpfd_next) snmpfd_next = TAILQ_NEXT(snmpfd, next); if (event_get_fd(snmpfd->ev) >= maxfd (!FD_ISSET(event_get_fd(snmpfd->ev), &fdset))) event_free(snmpfd->ev); TAILQ_REMOVE(snmp_fds, snmpfd, next); free(snmpfd); else FD_CLR(event_get_fd(snmpfd->ev), &fdset); /* Invariant: FD in fdset are not in list of FD */ for (int fd = 0; fd < maxfd; fd++) if (FD_ISSET(fd, &fdset)) snmpfd->ev = event_new(base, fd, EV_READ EV_PERSIST, levent_snmp_read, NULL); event_add(snmpfd->ev, NULL); TAILQ_INSERT_TAIL(snmp_fds, snmpfd, next); /* If needed, handle timeout */ evtimer_add(snmp_timeout, block?NULL:&timeout);
event_base_dispatch()) with this:
do if (event_base_got_break(base) event_base_got_exit(base)) break; netsnmp_check_outstanding_agent_requests(); levent_snmp_update(); while (event_base_loop(base, EVLOOP_ONCE) == 0);
static void levent_snmp_read(evutil_socket_t fd, short what, void *arg) FD_ZERO(&fdset); FD_SET(fd, &fdset); snmp_read(&fdset); levent_snmp_update(); static void levent_snmp_timeout(evutil_socket_t fd, short what, void *arg) snmp_timeout(); run_alarms(); levent_snmp_update();
ctypes module.
Twisted event loop is called a reactor. Like for libevent, events
need to be registered. It is possible to register file descriptor-like
objects using a class implementing a handful of methods. Here is the
implementation of such a class (adapted from PyNetSNMP, a subproject
of Zenoss using the ctypes module):
class SnmpReader: "Respond to input events" implements(IReadDescriptor) def __init__(self, fd): self.fd = fd def doRead(self): netsnmp.snmp_read(self.fd) def fileno(self): return self.fd
SnmpReader instances):
class Timer(object): callLater = None timer = Timer() fdMap = def updateReactor(): "Add/remove event handlers for SNMP file descriptors and timers" fds, t = netsnmp.snmp_select_info() for fd in fds: if fd not in fdMap: reader = SnmpReader(fd) fdMap[fd] = reader reactor.addReader(reader) current = Set(fdMap.keys()) need = Set(fds) doomed = current - need for d in doomed: reactor.removeReader(fdMap[d]) del fdMap[d] if timer.callLater: timer.callLater.cancel() timer.callLater = None if t is not None: timer.callLater = reactor.callLater(t, checkTimeouts)
updateReactor() at each iteration. Therefore, it must be called
after each SNMP related function.
For another example, have a look at
my equivalent implementation as a C extension.
SNMP-FRAMEWORK-MIB:: snmpEngineID, as described in RFC 5343.
Unfortunately, this discovery is done synchronously by
NetSNMP. There is a bug report for this issue but it
seems difficult to fix. I have not been able to come up with a proper
patch but I have described a workaround around
snmp_sess_async_send().
There is no such problem with SNMPv2.
snmp_select_info() and snmp_read() uses the fd_set type to
handle a set of file descriptors. This type should be manipulated with
FD_CLR(), FD_ISSET(), FD_SET() and FD_ZERO(). Those may be
defined as functions but they usually are macros. Moreover, no file
descriptor greater than FD_SETSIZE (which is usually set to 1024)
can be handled with the fd_set type. This means that if you have a
file descriptor greater than 1024, you won t be able to use
snmp_select_info() with it.
Starting from NetSNMP 5.5, you can use snmp_select_info2() and
snmp_read2() instead of snmp_select_info() and snmp_read(). They
use the netsnmp_large_fd_set.
If you want to keep compatibility with NetSNMP 5.4, here is another
twist. The fd_set type is usually a fixed-size array of long
integers. FD_CLR(), FD_ISSET() and FD_SET() are
size-independant. The size only matters for FD_ZERO() which is not
used by either snmp_select_info() or snmp_read(). You can
therefore allocate a larger fd_set. A common way is to compile your
program with -D__FD_SETSIZE=4096. You can still use FD_ZERO()
yourself. However, this is not portable (GNU C Library only). Another
way is to allocate your own array of long integers and cast it to
fd_set. You ll have to redefine FD_ZERO():
typedef struct long int fds_bits[4096/sizeof(long int)]; my_fdset; #undef FD_ZERO #define FD_ZERO(fdset) memset((fdset), 0, sizeof(my_fdset)) /* ... */ my_fdset fdset; FD_ZERO(&fdset); /* ... */ rc = snmp_select_info(&n, (fd_set *)&fdset, &timeout, &block); /* ... */
snmp_select_info() is part of the
traditional session API. You should replace it with
snmp_sess_select_info() and keep a list of SNMP sessions.
This API is not available for the agent side of NetSNMP.
apt-get install gitolite .
If you use puppet already you might be tempted to use puppet to manage your gitolite installation. This is all good, but I don't advice you to use modules like this one http://forge.puppetlabs.com/gwmngilfen/gitolite/1.0.0 as it's going to install gitolite from source and on debian it's not necessary ... For my purposes, I didn't find necessary to manage gitolite with puppet as all the default config options where good enough for me.
Once your debian package is installed, in order to initialize your repo, you just need to pass to gitolite the admin public key, that is your .ssh/id_rsa.pub key and then run this command:
/etc : This will sync your main puppet directory and trigger changes on the nodes for the next puppetd run. First I created a small shell script in /usr/local/bin/puppet-post-receive-hook.sh :
OpenSSH 6.0p1 was released a little while back; this weekend I belatedly got round to uploading packages of it to Debian unstable and Ubuntu quantal.
I was a bit delayed by needing to put together an improvement to privsep sandbox selection that particularly matters in the context of distributions. One of the experts on seccomp_filter has commented favourably on it, but I haven't yet had a comment from upstream themselves, so I may need to refine this depending on what they say.
(This is a good example of how it matters that software is often not built on the system that it's going to run on, and in particular that the kernel version is rather likely to be different. Where possible it's always best to detect kernel capabilities at run-time rather than at build-time.)
I didn't make it very clear in the changelog, but using the new seccomp_filter sandbox currently requires UsePrivilegeSeparation sandbox in sshd_config as well as a capable kernel. I won't change the default here in advance of upstream, who still consider privsep sandboxing experimental.
new week, new report about my work on RC bugs. again, mostly gcc
4.7 related, & again, mostly using patches prepared by others.
Mac OS X Adressbuch anschliessenAfter following this advice my Addressbook.app did successfully stored the contacts into DaviCals CardDAV from where I can sync with my iPhone. Maybe Andrew want to include this to the DaviCal wiki, maybe I'll do this myself by registering in the Wiki for that purpose... Oh, and I forgot: Using the Roundcube plugin from graviox is working nice as well with DaviCals CardDAV!
Oh ja wenn man mittels SSL drauzugreift, dann gibts Probleme.
Im der Applikation Adressbuch kann man zwar ein CardDAV Account anlegen bei dem man die Authorisierungsdaten und den kompletten Serverpfad (s.o.) eingeben kann, man l uft aber immer auf eine Fehlermeldung hinaus.
Die L sung ist, zweimal Create anzuklicken um den fehlerhaften Account anzulegen. Dann editiert man manuell folgende Datei:~/Library/Application Support/AddressBook/Sources/UNIQUE-ID/Configuration.plist
Dort tr gt man unter Server String die komplette URL ein.https://SERVERNAME/davical/caldav.php/USERNAME/contacts
Am besten modifiziert man noch das Feld HaveWriteAccess auf den Wert auf 1English translation: Connecting Mac OS X addressbook Oh, yes - there are problems when accessing via SSL. In Addressbook.app you can add a CardDAV account where you can define authentication and server path, but you'll always get an error message. The solution is to click twice on "Create" in order to create the faulty entry. Then you can edit the following file: ~/Library/Application Support/AddressBook/Sources/UNIQUE-ID/Configuration.plist There you enter your complete URL under Server String. https://SERVERNAME/davical/caldav.php/USERNAME/contacts It's best to modify the field HaveWriteAccess to the value "1"
I've just pushed out Obnam 0.29, my backup program.
NEWS snippet below.
This is a RELEASE CANDIDATE for 1.0, since there are no known bugs
that would block a 1.0 release. I'm not entirely happy with Obnam's
performance over sftp with small files, but it's not something I am
prepared to let block 1.0. I am going to try a few things to improve
things, but I want this release out first.
Please test and report any problems via this mailing list or as bugs
on the website or via IRC. I am on IRC only intermittently until 1.0
is released, so e-mail and bug reports are best options.
obnam-viewprof utility to translate Python profiling output
into human readable text form.
It has been a long time since I announced a version of
Larch on my blog: about 14 months.
A fair bit has happened since then: see the NEWS
file for details. Below is the snippet for today's release.
This is an implementation of particular kind of B-tree, based on research by
Ohad Rodeh. See "B-trees, Shadowing, and Clones" (copied here with permission
of author) for details on the data structure. This is the same data structure
that btrfs uses. Note that my implementation is independent from the btrfs
one, and might differ from what the paper describes.
The distinctive feature of this B-tree is that a node is never modified
(sort-of). Instead, all updates are done by copy-on-write. Among other things,
this makes it easy to clone a tree, and modify only the clone, while other
processes access the original tree. This is utterly wonderful for my
backup application, and that's the reason I wrote larch in the first place.
See the home page and
README for more information;
the API docs may be amusingly sparse.
Version 1.20120527, released 2012-05-27
Just for reference cause I had to figured it out again after upgrade from Mint Lisa to Mint Maya (which in Mint world means reinstalling whole system).
This is the way to create cowbuilder environment with Debian Sid/unstable under Linux Mint Maya or any Ubuntu based system:
sudo sed -ie 's/MIRRORSITE.*/MIRRORSITE=http://ftp.debian.org/debian/g' /etc/pbuilderrc
sudo apt-get install debian-archive-keyring
sudo cowbuilder --create --distribution sid --debootstrapopts --keyring=/usr/share/keyrings/debian-archive-keyring.gpg
Email spam is a plague, but sometimes there is at least on category of
spammers it is easy to have fun with: naive manual spammers. People that try to
do more or less legal business, using Internet in an illegitimate way, for
instance (this is a real example, including the spammer's address: spamming
bots, please use it ;-) !):
From: Emma Perroni <emmaperroni@gmail.com> Subject: Hello Hello, Do you have a Facebook page? If you do, I can offer you to add fans by hunders/thouthands in a single day using an original (and confidential) technique. We can also add subscribers to Twitter, Youtube or Google+1. Prices: 10 for 100 fans, -20% for more than 1000 fans ordered. RegardsReporting Well, in that case it may or may not be a scam, but even if it is not a criminal activity such as selling fake drugs, it is not a very honest business. Anyway, that lady is using her Google account to send her crap, so neutralizing her is quite easy:
Next.