Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70239

Re: Python, Linux, and the setuid bit

References <534C4F8D.6090005@stoneleaf.us>
Date 2014-04-15 11:15 +1000
Subject Re: Python, Linux, and the setuid bit
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.9261.1397524516.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Apr 15, 2014 at 7:13 AM, Ethan Furman <ethan@stoneleaf.us> wrote:
> When I compiled it I was given a couple warnings.  Can any one shed light on
> what they mean?

They mean, most likely, that the author compiled the program on his
own computer and not on any other. If I had to make a guess, I'd say
that it would compile nicely on a 32-bit system, and you're running a
64-bit system; according to gcc on my amd64 Debian Wheezy here,
sizeof(short) is 2 bytes, int is 4, long is 8.

Do you feel like patching the program? As Grant says, casting to (char
*) is the more usual way to do this sort of arithmetic. Since they're
being cast to (unsigned int), you'll *probably* get away with this, as
long as the environment doesn't exceed 4GB in size (!!), so you could
just ignore it (it's a warning, not an error, after all); but you can
probably fix it for all platforms by making the two changes Grant
suggested.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Python, Linux, and the setuid bit Chris Angelico <rosuav@gmail.com> - 2014-04-15 11:15 +1000

csiph-web