ó ºµiVc@sqdZddlmZddlZdejfd„ƒYZdd d„ƒYZd„Zed krmeƒndS( s\ Boot authorization class contains functions to manage setting and removing boot credential iÿÿÿÿ(tBootmgmtAddCredentialErrorNtMyDictcBsDeZdZdd„Zed„ƒZd„Zd„Zd„Z RS(s(A wrapper around dictionary objects cCs tjj||ƒt|_dS(N(tUserDictt__init__tFalset_dirty(tselftdct((s!../../common/bootmgmt/bootauth.pyR%scCs|jS(N(R(R((s!../../common/bootmgmt/bootauth.pytdirty)scCsH||jks"|j||krDt|_tjj|||ƒndS(N(tdatatTrueRRt __setitem__(Rtkeytitem((s!../../common/bootmgmt/bootauth.pyR -s" cCs2||jkr.t|_tjj||ƒndS(N(R R RRt __delitem__(RR ((s!../../common/bootmgmt/bootauth.pyR2s cCs5t|jƒdkr!t|_ntjj|ƒdS(Ni(tlenR R RRtclear(R((s!../../common/bootmgmt/bootauth.pyR7s N( t__name__t __module__t__doc__tNoneRtpropertyRR RR(((s!../../common/bootmgmt/bootauth.pyR"s    tCredentialStorecBsqeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z RS( smCredentialStore is a container for GRUB menu global password and menu entry's username and password. cCs"g|_tƒ|_d|_dS(s'Initializating a CredentialStore objecttN(tlist_superuserRtuserpwstpassword(R((s!../../common/bootmgmt/bootauth.pyRBs  cCs|jS(s6Return the dictionary containing username and password(R(R((s!../../common/bootmgmt/bootauth.pyt get_userpwsKscCs@||jkr/||j|s M