Article View: nl.comp.programmeren
Article #733Re: Paralelle Poort acess als gewone user?
From: Bernhard Dobbels
Date: Sun, 07 Nov 1999 00:00
Date: Sun, 07 Nov 1999 00:00
67 lines
2924 bytes
2924 bytes
In article <38253A80.6B32E584@skynet.be>, Bart Vandewoestyne wrote: >Bernhard Dobbels wrote: >> >> Debian eens installeren, dan werken al die dingen goed :) > >Heaven:~$ cat /etc/debian_version >potato > >Ik zou eerder durven stellen manpages-dev installeren ;-) Intussen >bekom ik de manpage dus, maar heb nog altijd problemen. Bekijk het >volgende: > >SYNOPSIS > #include <unistd.h> > > int setuid(uid_t uid) > >Hoe geef ik in godsnaam aan de functie setuid() een variabele van het >type uid_t mee ??? Kan iemand mij hier een voorbeeld van geven? Root >user heet dus "root" en als gewone user "user" gebruiken in het >voorbeeld, ok ? unistd.h: #include <bits/types.h> ... # ifndef gid_t typedef __gid_t gid_t; # define gid_t gid_t # endif # ifndef uid_t typedef __uid_t uid_t; # define uid_t uid_t # endif bits/types.h: typedef __u_int __uid_t; /* Type of user identifications. */ verder raak ik ook niet :( user is dus een int en root is altijd 0. dus setuid(0) zal er root van maken. groetjes >Tnx >MC303 > >-- >Bart Vandewoestyne http://hello.to/MC303 >Hugo Verrieststraat 48 Bart.Vandewoestyne@skynet.be >8550 ZWEVEGEM ICQ# 21275340 >BELGIUM - EUROPE nick: MC303 >Phone: +32(0)56/75.48.11 >------------------------------------------------------------------- >If carpenters made buildings the way programmers make programs, the >first woodpecker to come along would destroy all of civilization. > - Weinberg's Second Law - > -- Bernhard "One World, One Web, One Program" - Microsoft Promotional Ad "Ein Volk, Ein Reich, Ein Fuhrer" - Adolf Hitler
Technical Details
Message-ID:
<slrn82ao3q.ds1.Bernhard@Viking.tvd.kotnet.org>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3824ACD8.A1206590@skynet.be> <slrn82aadl.ds1.Bernhard@Viking.tvd.kotnet.org> <38253A80.6B32E584@skynet.be>Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: 107324,100fd66209ba543c X-Google-Attributes: gid107324,public X-Google-Thread: 100a19,100fd66209ba543c X-Google-Attributes: gid100a19,public X-Google-Thread: fcea4,100fd66209ba543c X-Google-Attributes: gidfcea4,public X-Google-Thread: fb7d6,100fd66209ba543c X-Google-Attributes: gidfb7d6,public From: Bernhard@KotNet.Org (Bernhard Dobbels) Subject: Re: Paralelle Poort acess als gewone user? Date: 1999/11/07 Message-ID: <slrn82ao3q.ds1.Bernhard@Viking.tvd.kotnet.org> X-Deja-AN: 545497242 Cache-Post-Path: marvin!dingy@tvd-10-67-68-47.tvd.kotnet.kuleuven.ac.be Content-Transfer-Encoding: 8bit References: <3824ACD8.A1206590@skynet.be> <slrn82aadl.ds1.Bernhard@Viking.tvd.kotnet.org> <38253A80.6B32E584@skynet.be> Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: abuse@belnet.be X-Trace: naxos.belnet.be 941973628 3352 134.58.127.3 (7 Nov 1999 11:20:28 GMT) Organization: KULeuvenNet X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) Mime-Version: 1.0 User-Agent: slrn/0.9.5.7 (UNIX) Reply-To: Bernhard@kotnet.org NNTP-Posting-Date: 7 Nov 1999 11:20:28 GMT Newsgroups: nl.comp.programmeren,be.comp.os.linux,be.comp.programming,nl.comp.os.linux