🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: nl.comp.programmeren
Article #713

Re: Paralelle Poort acess als gewone user?

#713
From: p2
Date: Thu, 11 Nov 1999 00:00
27 lines
2258 bytes
In article <3824ACD8.A1206590@skynet.be>,
	Bart Vandewoestyne <Bart.Vandewoestyne@skynet.be> writes:
> Ik zou willen een programma schrijven om de parallelle poort te sturen.
> Ik wil dit programma als gewone user kunnen uitvoeren.  Tot nu toe slaag
> ik erin om het programma goed te doen lopen als root.  In de Linux I/O
> port programming mini-HOWTO vond ik het volgende:
> 
> The ioperm() call requires your program to have root privileges; thus
> you need to either run it as the root user, or make it setuid root.  You
> can drop the root privileges after you have called ioperm() to enable
> the ports you want to use.  You are not required to explicitly drop your
> port access privileges with ioperm(..., 0) at the end of your program;
> this is done automatically as the process exits.
> 
> A setuid() to a non-root user does not disable the port access granted
> by ioperm(), but a fork() does (the child process does not get access,
> but the parent retains it).
> 

Je kan best gebruik maken van het parport device. Dat laat je toe vanuit een
user space programma willekeurige lijnen van de parpoort te zetten, zonder
dat je root moet zijn. Jammer genoeg is er niet veel documentatie over te 
vinden, dus zal je wat moeten kijken in drivers/char/ppdev.c.

good luck !

Peter.
Technical Details
Message-ID: <C2yW3.1020$M07.14096@news.chello.be>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3824ACD8.A1206590@skynet.be>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 100a19,100fd66209ba543c
X-Google-Attributes: gid100a19,public
X-Google-Thread: 107324,100fd66209ba543c
X-Google-Attributes: gid107324,public
X-Google-Thread: fb7d6,100fd66209ba543c
X-Google-Attributes: gidfb7d6,public
X-Google-Thread: fcea4,100fd66209ba543c
X-Google-Attributes: gidfcea4,public
From: p2@littleblue.linux-apollo.org (p2)
Subject: Re: Paralelle Poort acess als gewone user?
Date: 1999/11/11
Message-ID: <C2yW3.1020$M07.14096@news.chello.be>
X-Deja-AN: 547293006
References: <3824ACD8.A1206590@skynet.be>
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@tvd.be
X-Trace: news.chello.be 942320930 195.162.216.1 (Thu, 11 Nov 1999 12:48:50 MET)
Organization: Chello Usenet Service
Mime-Version: 1.0
NNTP-Posting-Date: Thu, 11 Nov 1999 12:48:50 MET
Newsgroups: nl.comp.programmeren,be.comp.os.linux,be.comp.programming,nl.comp.os.linux