DragonFly BSD
DragonFly submit List (threaded) for 2005-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

msdosfs permissions


From: "Erik Wikström" <erik-wikstrom@xxxxxxxxx>
Date: Sat, 9 Apr 2005 18:52:11 +0200

This patch adds the -M option to mount_msdos, which sets the permissions for
directories separate from the permissions of files. The code is taken
straight from the this commit to FreeBSD by Tom Rhodes:
http://lists.freebsd.org/pipermail/cvs-src/2003-August/008786.html

mount_msdos.diff: Changes to files in src/sbin/mount_msdos
msdos.diff: Changes to files in src/sys/vfs/msdosfs
Both are agains 1.3-Preview

Someone really ought to take a look at it if you are interested in this
feature, I'm not good at C and don't know if it's either WARNS?=6 or
style(9). It seems to work fine tough I don't really know how to make any
advanced tests.

--
Erik Wikström


begin 666 msdosfs.diff
M9&EF9B M=2 O=7-R+W-R8R]S>7,O=F9S+VUS9&]S9G,O;7-D;W-F<U]V9G-O
M<',N8R N+VUS9&]S9G-?=F9S;W!S+F,*+2TM("]U<W(O<W)C+W-Y<R]V9G,O
M;7-D;W-F<R]M<V1O<V9S7W9F<V]P<RYC"3(P,#4M,#(M,#(@,C(Z,S0Z,3@N
M,# P,# P,# P("LP,3 P"BLK*R N+VUS9&]S9G-?=F9S;W!S+F,),C P-2TP
M-"TP.2 Q-CHP.3HS-RXP,# P,# P,# @*S R,# *0$ @+3$Q,RPV("LQ,3,L
M-R! 0 H@"7!M<"T^<&U?9VED(#T@87)G<"T^9VED.PH@"7!M<"T^<&U?=6ED
M(#T@87)G<"T^=6ED.PH@"7!M<"T^<&U?;6%S:R ](&%R9W M/FUA<VL@)B!!
M3$Q015)-4SL**PEP;7 M/G!M7V1I<FUA<VL@/2!A<F=P+3YD:7)M87-K("8@
M04Q,4$5235,["B )<&UP+3YP;5]F;&%G<R!\/2!A<F=P+3YF;&%G<R F($U3
M1$]31E--3E1?34Y43U!4.PH@"6EF("AP;7 M/G!M7V9L86=S("8@35-$3U-&
M4TU.5%]5,E=404),12D@>PH@"0EB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YC"3(P,#4M,#0M,#D@
M,38Z,#DZ,S<N,# P,# P,# P("LP,C P"D! ("TU-BPW("LU-BPW($! "B *
M("\J"B @*B!86%@@+2!N;R!W87D@=&\@<W!E8VEF>2 B9F]O/3QB87(^(BUT
M>7!E(&]P=&EO;G,[('1H870G<R!W:&%T('=E)V0*+2 J('=A;G0@9F]R("(M
M=2(L("(M9R(L("(M;2(L("(M3"(L(&%N9" B+5<B+@HK("H@=V%N="!F;W(@
M(BUU(BP@(BUG(BP@(BUM(BP@(BU-(BP@(BU,(BP@86YD("(M5R(N"B @*B\*
M('-T871I8R!S=')U8W0@;6YT;W!T(&UO<'1S6UT@/2!["B )34]05%]35$1/
M4%13+ I 0" M.#0L,34@*S@T+#$U($! "B!["B )<W1R=6-T(&US9&]S9G-?
M87)G<R!A<F=S.PH@"7-T<G5C="!S=&%T('-B.PHM"6EN="!C+"!E<G)O<BP@
M;6YT9FQA9W,L('-E=%]G:60L('-E=%]U:60L('-E=%]M87-K.PHK"6EN="!C
M+"!E<G)O<BP@;6YT9FQA9W,L('-E=%]G:60L('-E=%]U:60L('-E=%]M87-K
M+"!S971?9&ER;6%S:SL*( EC:&%R("ID978L("ID:7(L(&UN='!A=&A;34%8
M4$%42$Q%3ET["B )<W1R=6-T('9F<V-O;F8@=F9C.PH@"BT);6YT9FQA9W,@
M/2!S971?9VED(#T@<V5T7W5I9" ]('-E=%]M87-K(#T@,#L**PEM;G1F;&%G
M<R ]('-E=%]G:60@/2!S971?=6ED(#T@<V5T7VUA<VL@/2!S971?9&ER;6%S
M:R ](# ["B );65M<V5T*"9A<F=S+" G7# G+"!S:7IE;V8H87)G<RDI.PH@
M"6%R9W,N;6%G:6,@/2!-4T1/4T937T%21U--04=)0SL*( HM"7=H:6QE("@H
M8R ](&=E=&]P="AA<F=C+"!A<F=V+" B<VPY=3IG.FTZ;SI,.E<Z(BDI("$]
M("TQ*2!["BL)=VAI;&4@*"AC(#T@9V5T;W!T*&%R9V,L(&%R9W8L(")S;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
M52!\(%-?25)76$<@?"!37TE25UA/*3L*( E]"B *( EE<G)O<B ](&=E='9F
M<V)Y;F%M92@B;7-D;W,B+" F=F9C*3L*0$ @+3(T-"PW("LR-3<L-R! 0 H@
M=7-A9V4H=F]I9"D*('L*( EF<')I;G1F*'-T9&5R<BP@(B5S7&XE<UQN(BP@
M"BT)(G5S86=E.B!M;W5N=%]M<V1O<R!;+6\@;W!T:6]N<UT@6RUU('5S97)=
M(%LM9R!G<F]U<%T@6RUM(&UA<VM=(BP**PDB=7-A9V4Z(&UO=6YT7VUS9&]S
M(%LM;R!O<'1I;VYS72!;+74@=7-E<ET@6RUG(&=R;W5P72!;+6T@;6%S:UT@
M6RU-(&UA<VM=(BP*( DB(" @(" @(" @(" @(" @(" @(%LM<UT@6RUL72!;
M+3E=(%LM3"!L;V-A;&5=(%LM5R!T86)L95T@8F1E=B!D:7(B*3L*( EE>&ET
/*$587U5304=%*3L*('T*
`
end




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