%!PS-Adobe-1.0 %%Creator: devps (Pipeline Associates, Inc.) %%CreationDate: Fri Sep 13 13:06:45 1996 %%Pages: (atend) %%DocumentFonts: (atend) /devps 180 dict def devps begin /res 10.000000 def /y_offset 843 def /X{exch}bind def /mm {transform round X round X itransform} bind def /r{rmoveto}bind def /m{moveto}bind def /l{lineto}bind def /rl{rlineto}bind def /st{stroke}bind def /gs{gsave}bind def /gr{grestore}bind def /cp{currentpoint}bind def /np{newpath}bind def /ct{curveto}bind def systemdict /setpacking known { /savepacking currentpacking def true setpacking } if /m0{0 0 moveto}bind def /xc{//res div}bind def /yc{//res neg div //y_offset add}bind def /lc{yc X xc X l st}bind def /mc{yc X xc X m}bind def /el{gs /a X def a div 1 X scale cp np a xc 2 div 0 360 arc st gr}bind def /ar{cp 7 2 roll np xc 5 1 roll atan 3 1 roll atan X arc st}bind def /sp{yc X xc X 6 2 roll yc X xc X 6 2 roll yc X xc X 6 2 roll ct}bind def /V{//res neg div //y_offset add currentpoint pop X m}bind def /H{//res div 0 transform X round X itransform pop currentpoint X pop moveto}bind def /h{//res div 0 r}bind def /v{//res neg div 0 X r}bind def /S{X H show}bind def /A{H //res div 1 index stringwidth pop sub 1 index length div 0 3 2 roll ashow}bind def /psize 10 def /height 0 def /cheight { height 0 ne { height } { psize } ifelse } bind def /slant 0 def /FF{findfont X dup 30 div 0 mm pop setlinewidth /psize X def [psize 0 cheight slant sin slant cos div mul cheight 0 0] makefont setfont}bind def /shade{gs /dy X def /dx X def np m 0 /dy rl /dx 0 rl 0 /dy neg rl /dx neg 0 rl closepath .9 setgray fill gr}bind def 1 setlinecap /resolution res 72 mul def /startFig { /SavedState save def userdict maxlength dict begin currentpoint transform DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap setlinewidth setmatrix itransform moveto /ury exch def /urx exch def /lly exch def /llx exch def /y exch 72 mul resolution div def /x exch 72 mul resolution div def currentpoint /cy exch def /cx exch def /sx x urx llx sub div def /sy y ury lly sub div def sx sy scale cx sx div llx sub cy sy div ury sub translate /DefFigCTM matrix currentmatrix def /initmatrix { DefFigCTM setmatrix } def /defaultmatrix { DefFigCTM exch copy } def /initgraphics { DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap setlinewidth setmatrix DefFigCTM setmatrix } def /showpage { initgraphics } def }bind def /clipFig { currentpoint 6 2 roll newpath 4 copy 4 2 roll moveto 6 -1 roll exch lineto exch lineto exch lineto closepath clip newpath moveto }bind def /doclip { llx lly urx ury clipFig } def /endFig { end SavedState restore }bind def /globalstart { fontnum psize slant height resolution currentpoint pagesave restore gsave }bind def /globalend { grestore moveto /resolution exch def /height exch def /slant exch def /psize exch def /fontnum exch def F /pagesave save def }bind def /fontnum 1 def systemdict /setpacking known { savepacking setpacking} if end /BP{ save mark devps begin m0 /DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecap currentlinejoin currentdash currentgray currentmiterlimit ] cvx def }bind def /EP{ end cleartomark restore showpage}def /Encoding-1 256 array def 0 1 255 {Encoding-1 exch /.notdef put} for Encoding-1 8#301 StandardEncoding 8#101 26 getinterval putinterval %A-B Encoding-1 8#341 StandardEncoding 8#141 26 getinterval putinterval %a-b Encoding-1 8#241 StandardEncoding 8#301 16 getinterval putinterval %accents Encoding-1 8#373 StandardEncoding 8#365 1 getinterval putinterval %dotlessi Encoding-1 dup 8#41 /copyright put dup 8#42 /registered put dup 8#43 /trademark put dup 8#44 /logicalnot put dup 8#45 /Eth put dup 8#46 /eth put dup 8#47 /Thorn put dup 8#50 /thorn put dup 8#51 /brokenbar put dup 8#52 /degree put dup 8#53 /divide put dup 8#54 /multiply put dup 8#55 /minus put dup 8#56 /onehalf put dup 8#57 /onequarter put dup 8#60 /threequarters put dup 8#101 /Aacute put dup 8#102 /Acircumflex put dup 8#103 /Adieresis put dup 8#104 /Agrave put dup 8#105 /Aring put dup 8#106 /Atilde put dup 8#107 /Ccedilla put dup 8#110 /Eacute put dup 8#111 /Ecircumflex put dup 8#112 /Edieresis put dup 8#113 /Egrave put dup 8#114 /Iacute put dup 8#115 /Icircumflex put dup 8#116 /Idieresis put dup 8#117 /Igrave put dup 8#120 /Ntilde put dup 8#121 /Oacute put dup 8#122 /Ocircumflex put dup 8#123 /Odieresis put dup 8#124 /Ograve put dup 8#125 /Otilde put dup 8#126 /Scaron put dup 8#127 /Uacute put dup 8#130 /Ucircumflex put dup 8#131 /Udieresis put dup 8#132 /Ugrave put dup 8#133 /Ydieresis put dup 8#134 /Zcaron put dup 8#135 /aacute put dup 8#136 /acircumflex put dup 8#137 /adieresis put dup 8#140 /agrave put dup 8#141 /aring put dup 8#142 /atilde put dup 8#143 /ccedilla put dup 8#144 /eacute put dup 8#145 /ecircumflex put dup 8#146 /edieresis put dup 8#147 /egrave put dup 8#150 /iacute put dup 8#151 /icircumflex put dup 8#152 /idieresis put dup 8#153 /igrave put dup 8#154 /ntilde put dup 8#155 /oacute put dup 8#156 /ocircumflex put dup 8#157 /odieresis put dup 8#160 /ograve put dup 8#161 /otilde put dup 8#162 /scaron put dup 8#163 /uacute put dup 8#164 /ucircumflex put dup 8#165 /udieresis put dup 8#166 /ugrave put dup 8#167 /ydieresis put dup 8#170 /zcaron put pop /Enc-dict 30 dict def Enc-dict /tmpstr1 50 string put Enc-dict /tmpstr2 50 string put Enc-dict /tmpstr3 50 string dup (Encoding-) exch cvs pop put /AEnc-def { % arguments: the original font's name, encoding nr Enc-dict begin tmpstr2 cvs /Enc-no exch def % Remember the number in a string dup /OrigName exch def % remember the name findfont dup maxlength dict /newdict exch def % get dictionary for new font { exch dup /FID ne { exch newdict 3 1 roll put } { pop pop } % Ignore FID ifelse } forall newdict begin /Encoding tmpstr3 9 Enc-no putinterval tmpstr3 0 9 Enc-no length add getinterval cvn load def % Replace encoding currentdict /UniqueID known { /UniqueID UniqueID Enc-no cvi 49999 mul add def } if % Derive New UniqueID end % newdict /FNlength OrigName tmpstr1 cvs length def % convert name, remember length FNlength 1 add Enc-no length add string dup 0 OrigName tmpstr1 cvs putinterval dup FNlength (-) putinterval dup FNlength 1 add Enc-no putinterval dup 0 tmpstr1 0 FNlength getinterval putinterval % Add old name cvn dup newdict /FontName 3 2 roll put newdict definefont end % Enc-dict } def /Times-Roman 1 AEnc-def pop /R-1{/Times-Roman-1 FF}def /R{/Times-Roman FF}def /B{/Times-Bold FF}def /I{/Times-Italic FF}def %%EndProlog %%Page: 1 1 BP /slant 0 def /height 0 def 480 V 10 R 720(GETGRENT)S 1262(\()S 1304(3)S 1362(\))S 2696(Eighth)S (Edition)296 2989 A 4585(GETGRENT)S 5127(\()S 5169(3)S 5227(\))S 960 V 9 R 720(N)S 722(NA)S 790(AM)S 858(ME)S 940(E)S 1080 V 10 R 1080(getgrent,)S 1460(getgrnam,)S 1890(getgrgid,)S 2275(setgrent,)S (endgrent,)377 2644 A 3046(setgr\256le)S 10 R-1 3396(-)S 10 R (group)234 3478 A 3737(\256le)S 3891(routines)S 1248 V 9 R 720(S)S 722(SY)S 774(YN)S 842(NO)S 910(OP)S 978(PS)S 1030(SI)S 1082(IS)S 1115(S)S 1368 V 10 B 1080(#include)S 1482()S 1608 V 1080(struct)S 1371(group)S 1666(*getgrent\(void\))S 1728 V 1080(struct)S 1371(group)S 1666(*getgrnam\(const)S 2426(char)S 2660(*)S 10 I 2710(name)S 10 B 2928(\))S 1848 V 1080(struct)S 1371(group)S 1666(*getgrgid\(gid_t)S 10 I 2364(gid)S 10 B 2492(\))S 1968 V 1080(int)S 1236(setgrent\(void\))S 2088 V 1080(void)S 1302(endgrent\(void\))S 2208 V 1080(void)S 1302(setgr\256le\(const)S 1940(char)S 2174(*)S 10 I 2224(\256le)S 10 B 2347(\))S 2376 V 9 R 720(D)S 722(DE)S 790(ES)S 848(SC)S 900(CR)S 962(RI)S 1024(IP)S 1057(PT)S 1109(TI)S 1167(IO)S 1200(ON)S 1268(N)S 2496 V 10 R 1080(These)S 1354(functions)S 1761(are)S 1918(used)S 2135(to)S 2246(obtain)S 2530(information)S 3038(from)S 3267(the)S (group)234 3423 A 3690(\256le.)S 3902(They)S 4142(return)S 4416(this)S 4595(information)S 5104(in)S 5216(a)S 2616 V 10 B 1080(struct)S 1358(group)S 10 R 1640(as)S 1749(de\256ned)S 2070(by)S 2195(:)S 2784 V 1080(struct)S (group)234 1329 A 1588({)S 2904 V 1280(char)S 1580(*gr_name;)S 2330(/*)S 2433(login)S 2664(name)S 2907(*/)S 3024 V 1280(char)S 1580(*gr_passwd;)S 2330(/*)S 2433(encrypted)S 2855(password)S 3260(*/)S 3144 V 1280(gid_t)S 1580(gr_gid;)S 2330(/*)S 2433(numeric)S (group)234 2788 A 3047(id)S 3150(*/)S 3264 V 1280(char)S (**gr_mem;)463 1580 A 2330(/*)S 2433(null-terminated)S 3079(list)S 3227(of)S (group)234 3336 A 3595(members)S 3989(*/)S 3384 V 1080(};)S 3552 V 10 B (Getgrent\(\))455 1080 A 10 R 1569(reads)S 1816(the)S (group)234 1973 A 2241(\256le)S 2404(entry)S 2645(by)S 2779(entry.)S 10 B 3070(Getgrnam\(\))S 10 R 3614(scans)S 3866(the)S 4023(entire)S (group)234 4287 A 4555(\256le)S 4718(for)S 4870(the)S (group)234 5027 A 3672 V 1080(with)S 1300(the)S 1464(given)S 10 I 1728(name)S 10 R 1954(.)S 10 B 2045(Getgrgid\(\))S 10 R (looks)217 2540 A 2798(for)S 2957(the)S 3121(\256rst)S (group)234 3318 A 3592(with)S 3811(the)S 3974(given)S 10 I 4237(gid)S 10 R 4373(.)S 4463(The)S 10 B (setgrent\(\))416 4660 A 10 R 5116(and)S 3792 V 10 B (endgrent\(\))455 1080 A 10 R 1567(functions)S 1973(are)S 2129(used)S 2345(to)S 2455(open)S 2682(and)S 2859(later)S 3071(close)S 3310(the)S (group)234 3465 A 3731(\256le.)S 3942(With)S 10 B 4176(setgr\256le\(\))S 10 R 4619(one)S 4797(can)S 4970(specify)S 3912 V 1080(the)S 1234(\256le)S 1394(to)S 1503(read)S 1708(other)S 1946(than)S 2150(the)S 2304(normal)S (group)234 2620 A 2885(\256le.)S 3095(This)S 3305(only)S 3514(sets)S 3696(the)S 3850(name,)S 4124(the)S 4278(next)S 10 B (setgrent\(\))416 4482 A 10 R 4928(call)S (will)157 5104 A 4032 V 1080(open)S 1303(the)S 1455(\256le.)S 1663(Do)S 1815(not)S 1972(touch)S 2224(the)S 2376(\256le)S 2534(name)S 2781(while)S 3034(it)S 3119(is)S 3215(active.)S 3535(Use)S 10 B 3721(setgr\256le\(NULL\))S 10 R 4440(to)S 4547(revert)S 4812(back)S 5031(to)S 5138(the)S 4152 V 1080(normal)S (group)234 1390 A 1649(\256le.)S 4320 V 1080(The)S 1262(usual)S 1499(way)S 1692(to)S 1795(scan)S 1999(the)S (group)234 2147 A 2406(\256le)S 2560(is)S 2652(\(error)S 2908(checking)S (omitted\):)369 3296 A 4488 V 1440(setgrent\(\);)S 4608 V 1440(while)S 1689(\(\(gr)S 1866(=)S (getgrent\(\)\))432 1948 A 2405(!=)S 2521(NULL\))S 4728 V 1800(if)S (\(appropriate_test\(gr\)\))869 1887 A 2781(break;)S 4848 V (endgrent\(\);)448 1440 A 5016 V 1080(The)S 10 B 1266(gr)S 10 R 1390(variable)S 1744(contains)S 2108(the)S 2260(entry)S 2496(that)S 2676(is)S 2772(wanted)S 3092(if)S (non-NULL.)479 3184 A 3718(The)S 10 B 3905(getgrnam\(\))S 10 R 4417(and)S 10 B 4592(getgrgid\(\))S 10 R 5048(func-)S 5136 V 1080(tions)S 1300(are)S 1449(implemented)S 1999(as)S 2108(in)S 2211(this)S 2381(example,)S 2772(with)S 2976(error)S 3198(checking)S 3586(of)S 3695(course.)S 5304 V 10 B (Getgrent\(\))455 1080 A 10 R 1563(calls)S 10 B (setgrent\(\))416 1776 A 10 R 2220(if)S 2310(this)S 2483(has)S 2645(not)S 2801(yet)S 2952(been)S (done.)220 3170 A 10 B (Setgrent\(\))433 3443 A 10 R 3904(\256rst)S 4089(calls)S 10 B (endgrent\(\))455 4302 A 10 R 4785(if)S 4875(the)S (group)234 5027 A 5424 V 1080(\256le)S 1234(is)S (still)151 1326 A 1502(open.)S 1772(\(Other)S 2061(implementations)S 2756(may)S 2954(simply)S 3252(rewind)S 3557(the)S 3705(\256le.\))S 5592 V 9 R 720(F)S 722(FI)S 774(IL)S 807(LE)S 865(ES)S 923(S)S 5712 V 10 B 1080(/etc/group)S 10 R 1830(The)S (group)234 2012 A 2271(\256le)S 2425(database.)S 5880 V 9 R 720(S)S 722(SE)S 774(EE)S 832(E)S 913(A)S 915(AL)S 983(LS)S 1041(SO)S 1093(O)S 6000 V 10 B 1080(getgroups)S 10 R 1505(\(2\),)S 10 B 1673(initgroups)S 10 R 2115(\(3\),)S 10 B 2283(getpwent)S 10 R 2676(\(3\),)S 10 B 2844(passwd)S 10 R 3157(\(5\).)S 6168 V 9 R 720(D)S 722(DI)S 790(IA)S 823(AG)S 891(GN)S 959(NO)S 1027(OS)S 1095(ST)S 1147(TI)S 1205(IC)S 1238(CS)S 1300(S)S 6288 V 10 B (Setgrent\(\))433 1080 A 10 R 1542(has)S 1705(the)S 1857(same)S 2093(return)S 2363(value)S 2610(and)S 2784(error)S 3011(codes)S 3270(as)S 3384(the)S 10 B 3537(open)S 10 R 3744(\(2\))S 3892(call)S 4068(it)S 4154(uses)S 4357(to)S 4465(open)S 4690(the)S (group)234 4843 A 5107(\256le.)S 6408 V 1080(The)S 10 B 1273(get)S 10 I (xxx)135 1402 A 10 B 1545(\(\))S 10 R 1649(functions)S 2059(return)S 2336(NULL)S 2642(on)S 2778(end)S 2959(of)S 3079(\256le,)S 3269(entry)S 3512(not)S (found,)259 3676 A 3971(or)S 4091(error.)S 4374(You)S 4583(can)S 4759(set)S 10 B (errno)241 4907 A 10 R 5183(to)S 6528 V 1080(zero)S 1279(before)S 1562(the)S 1710(call)S 1881(and)S 2051(check)S 2311(it)S 2392(after.)S 6696 V 9 R 720(N)S 722(NO)S 790(OT)S 858(TE)S 916(ES)S 974(S)S 6816 V 10 R 1080(All)S 10 B 1234(get)S 10 I (xxx)135 1363 A 10 B 1506(\(\))S 10 R 1599(routines)S 1948(return)S 2214(a)S 2284(pointer)S 2594(to)S 2697(static)S 2935(storage)S 3251(that)S 3427(is)S (overwritten)465 3519 A 4009(in)S (each)185 4112 A 4322(call.)S 6984 V 1080(Only)S 10 B 1330(getgrnam\(\))S 10 R 1861(and)S 10 B 2055(getgrgid\(\))S 10 R 2530(are)S 2703(de\256ned)S 3048(by)S 8 R 3192(POSIX)S 10 R 3425(.)S 3524(The)S 10 B (_MINIX_SOURCE)839 3730 A 10 R 4619(macro)S 4921(must)S 5166(be)S 7104 V 1080(de\256ned)S 1407(before)S 1696(including)S 2106()S 2460(to)S 2569(make)S 2818(the)S 2971(other)S 3208(functions)S 3612(visible.)S 3960(The)S 10 B 4147(gr_passwd)S 10 R 4635(\256eld)S 4844(is)S 4941(also)S 5133(not)S 7224 V 1080(de\256ned)S 1405(by)S 8 R 1529(POSIX)S 10 R 1762(,)S 1816(but)S 1973(is)S 2069(always)S 2378(visible.)S 2725(Portable)S 3091(code)S (cannot)268 3311 A 3609(reliably)S 3947(detect)S 4218(errors)S 4484(by)S (setting)268 4614 A 10 B (errno)241 4912 A 10 R 5183(to)S 7344 V 1080(zero.)S 1337(Under)S 1622(Minix)S 1900(it)S 1989(is)S 2089(better)S 2351(to)S 2461(make)S 2711(a)S 10 B (getgrent\(\))427 2788 A 10 R 3247(scan)S 3458(if)S (you)150 3552 A 3734(need)S 3956(to)S (look)178 4066 A 4276(up)S 4408(several)S (group-id's)419 4726 A 5177(or)S 7464 V 1080(names,)S 1403(but)S 1572(portable)S 1943(code)S 2174(had)S 2360(better)S 2631(use)S 2806(several)S 10 B 3133(getgrgid\(\))S 10 R 3600(or)S 10 B 3725(getgrnam\(\))S 10 R 4249(calls.)S 4526(The)S 10 B (getgrent\(\))427 4725 A 10 R 5194(is)S 7903 V 720(Page)S 941(1)S 4455(September)S 4911(13,)S (1996)200 5061 A 8143 V EP %%Page: 2 2 BP /slant 0 def /height 0 def 480 V 10 R 720(GETGRENT)S 1262(\()S 1304(3)S 1362(\))S 2696(Eighth)S (Edition)296 2989 A 4585(GETGRENT)S 5127(\()S 5169(3)S 5227(\))S 960 V 1080(usually)S 1399(available)S 1791(on)S 1919(other)S 2154(systems,)S 2525(but)S 2681(may)S 2882(be)S 3005(very)S 3212(expensive.)S 3692(See)S 10 B 3866(initgroups)S 10 R 4308(\(3\))S 4454(if)S (you)150 4544 A 4722(are)S 4874(after)S 5088(sup-)S 1080 V 1080(plementary)S (group)234 1558 A 1817(id's.)S 1248 V 9 R 720(A)S 722(AU)S 790(UT)S 858(TH)S 916(HO)S 984(OR)S 1052(R)S 1368 V 10 R 1080(Kees)S 1307(J.)S 1396(Bot)S 1566(\(kjb@cs.vu.nl\))S 7903 V 720(September)S 1176(13,)S (1996)200 1326 A 4990(Page)S 5211(2)S 8143 V EP %%Trailer %%DocumentFonts: Times-Roman Times-Bold Times-Italic %%Pages: 2