iOS v. 5, but it would be nice to have
it integrated to the Newsstand. Thank
you for the good job; I’m going to
renew my subscription for sure.
Integrating with the various storefronts
is something we’re researching, but it’s
a complex endeavor. Hopefully, someday
Linux Journal will be available seamlessly
on any platform. Right now, the iOS
app is the best way to get automatic
ELF Virus, Part I—Program Bug
I read with interest Himanshu Arora’s
article, “ELF Virus, Part I”, in the January
2012 issue of Linux Journal. However,
I discovered a bug in his code that will
cause the program to fail in certain cases.
Near the end of the infect() routine,
he uses the rename() function to
rename the modified executable back to
its original name. This call will fail if /tmp
and /home are on different filesystems,
as they are on my system.
My workaround was to change the
#define TMPLATE directive to a temporary
file on the same filesystem as /home. A
more robust alternative would be to test
for the potential error condition and use
a system() call to move the file, or
use write() to replace the original file.
Thank you for the interesting article. I
look forward to following this series.
Himanshu Arora replies: First, thanks
for reading the article. Regarding the
issue you pointed out, I don’t think
that it’s a bug. It’s one of those many
scenarios in which the rename()
function errors out. I have done proper
error handling in the code for this.
Your suggestion can well be addressed
as an enhancement to the code in
the sense that the logic won’t error
out if rename() fails. This comment
could well apply to many of the other
system calls used in my code. Because
this code was more of a proof of
concept rather than an actual virus, I
refrained from adding such complexity
to the code.
Anyway, I appreciate your hard work and
would like to thank you for your review.
Product of the Year: GNOME 3???
I have long considered Linux Journal
to be a reliable source of information,
but declaring GNOME 3 as Product
of the Year is really disappointing to
me (see the Readers’ Choice Awards
in the December 2011 issue). I find it
pretty hard to believe that this could be
voted on as Product of the Year. It has
been widely accepted in many, many
forums that GNOME 3 is a huge step in
the wrong direction. As a reader and
longtime Linux user, I find it hard to
believe that this is what voters said.