ts-7000
[Top] [All Lists]

Re: [ts-7000] FYI: setuid + pthreads is bad!

To:
Subject: Re: [ts-7000] FYI: setuid + pthreads is bad!
From: Robert Ulbrich <>
Date: Mon, 3 May 2010 18:00:17 -0500


Ian,

On the 7800, the default OS is Debian 3.1 (Sarge) which includes and older version of the pthreads library, implementing LinuxThreads. LinuxThreads is not completely POSIX compliant. As a matter of fact, each thread gets it's own process id and shows up under 'top' as a separate process. I can even change the user and group ID for one thread while the other threads retain their originals.

LinuxThreads also has issues with signals, basically, don't use signals with pthreads.

Robert

On Mon, May 3, 2010 at 2:40 PM, Ian Thompson <> wrote:
Â

Robert

The Linux pthreads man page says that POSIX.1 requires threads to share
user and group IDs!!!

NAME
pthreads - POSIX threads

DESCRIPTION
POSIX.1 specifies a set of interfaces (functions, header files) for
threaded programming commonly known as POSIX threads, or Pthreads. A single
process can contain multiple threads, all of which are executing the
same program. These threads share the same global memory (data and heap segâ
ments), but each thread has its own stack (automatic variables).

POSIX.1 also requires that threads share a range of other attributes
(i.e., these attributes are process-wide rather than per-thread):

- process ID

- parent process ID

- process group ID and session ID

- controlling terminal

- user and group IDs

etc, etc.

The man pages also say that seteuid conforms to POSIX.1-2001, so it
SHOULD be thread safe. Perhaps you have found a bug in the ARM
implementation.

Ian T.

This e-mail, including any attachments and response string, may contain proprietary information which is confidential and may be legally privileged. It is for the intended recipient only. If you are not the intended recipient or transmission error has misdirected this e-mail, please notify the author by return e-mail and delete this message and any attachment immediately. If you are not the intended recipient you must not use, disclose, distribute, forward, copy, print or rely on this e-mail in any way except as permitted by the author.




--
Robert Ulbrich
Software Developer
CAPSHER Technology, Inc.
1604 Crescent Pointe Pkwy.
979.776.7520 x150


__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU