[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Better personae management for MiNT 1.11beta



Hi there,

while porting sendmail I soon found out that MiNT's concept of real and
effective user management is implementend only partially. So I started
to do some (re-)writing to complete some parts and to make other parts
react the way you would expect them to (to be more precise: the way they
react under Linux as I first looked into its kernel sources to see how
other people have done it.)

So the following small archive contains patches that implement corrected
versions of the Psetuid() and Psetgid() calls as well as two new calls
Psetreuid() and Psetregid(). Especially the first two calls now behave
the way they do on many other systems.

To apply the patches, follow these steps:

1st) Change to the directory containing the MiNT 1.11beta sources and do
a "patch < /enter/correct/path/to/mintdiff"

2nd) Change to the directory containing your MiNTlib include files and
do a "patch < /enter/correct/path/to/diffh"

3rd) Unfortunately you have to patch the MFS sources as well, because in
some places the Getuid() call has been used falsely instead of Geteuid()
resulting in a wrong file ownership when the effective id was not the
same as the real id. So change to the directory containing your MFS
sources, then change to the minixfs/ folder and do a "patch <
/enter/correct/path/to/mfsdiff". If you have applied TeSche's MFS
patches to make ftpd run, you may safely skip this step, as his patches
solve this bug as well.

4th) Finally, you have to replace some files in the MiNTlibs, since the
library doesn't handle the sete[ug]id() correctly and doesn't know about
the setre[ug]id() calls. So put all four *.c files in your MiNTlib
source tree, add two new targets sete[ug]id.o to the administration
files (otherwise they won't appear in your library) and recompile. These
files will also work correctly with older versions of MiNT. If a version
prior to 1.11 is detected, the functions will fall back to their old
behaviour.


I'm using these patches now for more then six weeks and I haven't
discovered any strange behaviour that might relate to them, so I think
they are quite safe. 

Unfortunately there are no manpages yet as I don't speak troff and I
don't have much time at the moment. But as all these calls are quite
common, I hope this won't hurt very much. I'm hoping to be able to hand
in the manpages later. Or maybe someone else wants to do them...

As I think these patches are of interesst for many people, it might be a
good idea to incorporate them in the next (official) MiNT release (and
if this will be the case, in the next MiNTLibs release as well).



       Sascha Blank
       Trier, den 5. September 1994


/--------------------+---------------------------------------------------\
| Sascha Blank       | Voice (FAX/Data by arrangement): +49 (0)651 84831 |
| Brentanostrasse 21 |             FAX (always online): +49 (0)651 49895 |
| D-54294 Trier      |             InterNet: inf03@apollo23.uni-trier.de |
| Deutschland        |       PGP Key: available on request or use finger |
| Key fingerprint    |  5D EE CD 3B 36 A9 E2 AB  C1 85 4D 39 41 7E 0F 20 |
\--------------------+---------------------------------------------------/



begin 644 ids.tgz
M'XL(`!S;:BX`!>T:^T_;2+._AK]BT$G]8IH$K_,.1R6.T@KU007TA]/=R3+)
MQEA-;,N/`M?ROW^S+]MQ[`1*`[T[CZ(DNSL[,SNOG5U[XDRGE\\V"T37>YT.
M/`,&>NX7P#!Z!*#;,WIZU^CW#0"B&_WN,]`W+!>'.(RL`.!9X'G1*KRK2TIG
MCR'0X\+.S@[,'3>Z<-Q)Z[)V'E-XS_1!T"RC;G=D=(`,AYVM9K,)NXX[GL43
MNIN9<&9%<!#;0-I`^B.=C'1#3-A9!-:&SF#0Z`R[P#L`:K4HL'R3F%=75W7]
MFK1I`^KAI1=$6OT+'6MI*W1L3<,9OTSHU'$IG,5^Y,QI7?PTP/I"W2!VM1K"
MGPN49S-.>8JT9IYK:W**EK355&UK&]@'F5!WXDQA=P=,\]W!^?GQX9%IPLYN
M;NC\T^EO)X=JA"N(K:^K#P'_-W_&]2GR'T,:T=B9U)T))\F(;B/1.MI52V1F
MA#OM5$A$7B)BWXE(IYR(32.+25).@E/HYCE;=Q._MY*S'7BQ']9Q$4AQ1MT&
MB+]:&4VN[$X_)9I,314N2>0%EKQ<\7M'3H.4DYRXED_`#1LXDP90I9\B!D(_
M1RD#G)+Q2%I@[8";^ZZD7Z\F_;UQ]M0)\U\&\VF(FIYNE,>:_;]MZ&+_USL]
MO4_X_M\CU?[_*,"VY5W<T:=A4V_U]*8_(SK;WYWK::A^6^/:Z\#!NN"&;?-Z
M=T0&(SU3%RRBL6H`NJP:(.V1T2NO!HQ>OV'T.VDU4*O-O0F%;_N@$T+V6-\M
M^PH<WZ57+<=DP_MP;)X>O?GT[N`4O@'KV6,I*,'![+?_AD9\3UD<L<6(+4:R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