Ñò ɼjWc @sàdZddkZddkZddkZddkZddkZddkZddk Zddk Zddk Zei i Z hdefd6defd6defd6defd6Zd „Zd „Zd „Zd „ZdS( s”This module implements the "zfs userspace" and "zfs groupspace" subcommands. The only public interface is the zfs.userspace.do_userspace() function.iÿÿÿÿNtuseds userused@tquotas userquota@s groupused@s groupquota@cCsmt|\}}|o%d|ijod|ijotS| o%d|ijod|ijotStS(sAReturn True if this property (eg "userquota@") should be skipped.t posixgrouptsmbgroupt posixusertsmbuser(tpropsttypestTruetFalse(toptionstproptfieldtisgroup((s../../common/userspace.pytskiptype0sc Csª|od||f}n d|}hdd„fd6dd„fd6d d „fd6d d „fd6|t|ƒf\}}|iƒid dƒ|ijod Stƒ}||d<|i o;|d!jo.y||ƒ|dDsis POSIX GroupcSstit|ƒƒiS((tgrptgetgrgidtinttgr_name(R((s../../common/userspace.pyREsisSMB UsercSstii|dƒS(i(RRR(R((s../../common/userspace.pyRFss POSIX UsercSstit|ƒƒiS((tpwdtgetpwuidRtpw_name(R((s../../common/userspace.pyRGst tttypeitnames%20ds name.sortt0Rs used.sortRtnones quota.sorttdefaulttsource(ii(ii(ii(iiNl( tbooltlowertreplaceRtNonetdicttnonametKeyErrortparsabletstrtzfstutiltnicenum( R R tdomaintridtdefquotatidstrttypenametmapfunctv((s../../common/userspace.pyt new_entry;s@ "           c Csy|\}}}t|\}} |ioK|oDy*tiid||f| ƒ}d}Wqttj oqtXn| ||f} y|| } WnAtj o5t|| |||ƒ} | pdS| || ƒ| ƒq½q½WˆipdLdMgˆ_nd ˆijo|dˆ_ntii|d6d?ƒ} | id@ƒotiiƒo tˆ_n| idAƒptdBƒGH| iƒntƒ} d;} xÀtiƒD]²} tˆ| ƒoq´nt| \}}|o | dCjo| idDƒ} n/| o | dEjo| idFƒ} nd;} x-| i| ƒD]}t| ˆ| || ƒqFWq´W‡fdG†}tii ˆi |ƒ} x*| i!ƒD]}| i"||ƒ|ƒqžW| i#ˆi$ ƒdHS(Ns@Implements the "zfs userspace" and "zfs groupspace" subcommands.cs5ˆiƒ|oHˆid|ƒn ˆiƒdS(Ns zfs: error: (t print_helptexit(tmsg(tparser(s../../common/userspace.pytusage•s  it userspacesposixuser,smbusersposixgroup,smbgroupRRRRR"tallRRRRs-%s [-niHp] [-o field[,...]] [-sS field] ... s) [-t type[,...]] RCtprogR,s-ntactiont store_truetdestR(thelps+Print numeric ID instead of user/group names-iR8s.translate SID to posix (possibly ephemeral) IDs-Ht noheaderss no headers, tab delimited outputs-pR*sexact (parsable) numeric outputs-otfieldstmetavars field[,...]R!stype,name,used,quota,sources1print only these fields (eg type,name,used,quota)s-st sortfieldsR tchoicetchoicestcallbacks sort fields-Ssreverse sort fields-tRs type[,...]sEprint only these types (eg posixuser,smbuser,posixgroup,smbgroup,all)iswrong number of argumentsit,sinvalid field %ssinvalid type %st filesystemtzonedtuseraccountingsEInitializing accounting information on old filesystem, please wait...s groupused@tdefaultgroupquotas userused@tdefaultuserquotac sÀtƒ}x°ˆiD]¥\}}y||d}Wntj o||}nX|djoMy | }Wq«tj o/g}|D]}|t|ƒ q…~}q«Xn|i|ƒqW|S(Ns.sorts-S(tlistRNR)t TypeErrortordtappend(tvaltltoptR tnt_[1]tc(R (s../../common/userspace.pytcmpkeyós    1N(stypesnamesusedsquotassource(susedsquota(salls posixuserssmbusers posixgroupssmbgroup(s-sstype(s-ssname(%R&tsystargvt_R,R-tZFSOptionParsert add_optionRXtappend_with_optt parse_argstlenRLtsplitRRNtdatasettDatasettgetpropRRt isglobalzoneRR(tuserspace_upgradeR'RtkeysRRDR>ttabletTablet itervaluestaddlinetprintmeRK(RCt defaulttypesRLt rjustfieldsRtutargstdsnametftttdsR:R1R R R R;RbR\((RBR s../../common/userspace.pyt do_userspace’sš                      (t__doc__RcRRterrnot solaris.miscRtzfs.utilR,t zfs.ioctlt zfs.datasett zfs.tableR-ReR RRRR6R>R(((s../../common/userspace.pyts&              0 '