コード例 #1
0
ファイル: PasswordAttributeViewer.cs プロジェクト: MrJoe/lat
        public override void OnActivate(string attributeName, string attributeData)
        {
            passwordData = null;
            PasswordDialog pd = new PasswordDialog();

            if (pd.UnixPassword == null)
            {
                return;
            }

            switch (attributeName.ToLower())
            {
            case "userpassword":
                passwordData = pd.UnixPassword;
                break;

            case "sambalmpassword":
                passwordData = pd.LMPassword;
                break;

            case "sambantpassword":
                passwordData = pd.NTPassword;
                break;

            default:
                break;
            }
        }
コード例 #2
0
        public void OnSetPasswordClicked(object o, EventArgs args)
        {
            PasswordDialog pd = new PasswordDialog();

            if (!passwordEntry.Text.Equals("") && pd.UnixPassword.Equals(""))
            {
                return;
            }

            passwordEntry.Text = pd.UnixPassword;
            smbLM = pd.LMPassword;
            smbNT = pd.NTPassword;
        }
コード例 #3
0
        public void OnPasswordClicked(object o, EventArgs args)
        {
            PasswordDialog pd = new PasswordDialog();

            if (pd.UnixPassword.Equals(""))
            {
                return;
            }

            pass  = pd.UnixPassword;
            smbLM = pd.LMPassword;
            smbNT = pd.NTPassword;

            passChanged = true;
        }
コード例 #4
0
ファイル: ViewDataTreeView.cs プロジェクト: MrJoe/lat
        void ChangePassword(LdapEntry entry, PasswordDialog pd)
        {
            List <LdapModification> mods = new List <LdapModification> ();

            LdapAttribute    la;
            LdapModification lm;

            la = new LdapAttribute("userPassword", pd.UnixPassword);
            lm = new LdapModification(LdapModification.REPLACE, la);
            mods.Add(lm);

            if (Util.CheckSamba(entry))
            {
                la = new LdapAttribute("sambaLMPassword", pd.LMPassword);
                lm = new LdapModification(LdapModification.REPLACE, la);
                mods.Add(lm);

                la = new LdapAttribute("sambaNTPassword", pd.NTPassword);
                lm = new LdapModification(LdapModification.REPLACE, la);
                mods.Add(lm);
            }

            Util.ModifyEntry(conn, entry.DN, mods.ToArray());
        }
コード例 #5
0
ファイル: ViewDataTreeView.cs プロジェクト: MrJoe/lat
        void OnPwdActivate(object o, EventArgs args)
        {
            PasswordDialog pd = new PasswordDialog();

            if (pd.UserResponse == ResponseType.Cancel)
            {
                return;
            }

            if (pd.UnixPassword == null || pd.UnixPassword == "")
            {
                return;
            }

            TreeModel model;

            TreePath[] tp = this.Selection.GetSelectedRows(out model);

            foreach (TreePath path in tp)
            {
                LdapEntry le = conn.Data.GetEntry(GetDN(path));
                ChangePassword(le, pd);
            }
        }
コード例 #6
0
ファイル: ViewDataTreeView.cs プロジェクト: MrJoe/lat
        void OnPwdActivate(object o, EventArgs args)
        {
            PasswordDialog pd = new PasswordDialog ();
            if (pd.UserResponse == ResponseType.Cancel)
                return;

            if (pd.UnixPassword == null || pd.UnixPassword == "")
                return;

            TreeModel model;
            TreePath[] tp = this.Selection.GetSelectedRows (out model);

            foreach (TreePath path in tp) {
                LdapEntry le = conn.Data.GetEntry (GetDN(path));
                ChangePassword (le, pd);
            }
        }
コード例 #7
0
ファイル: ViewDataTreeView.cs プロジェクト: MrJoe/lat
        void ChangePassword(LdapEntry entry, PasswordDialog pd)
        {
            List<LdapModification> mods = new List<LdapModification> ();

            LdapAttribute la;
            LdapModification lm;

            la = new LdapAttribute ("userPassword", pd.UnixPassword);
            lm = new LdapModification (LdapModification.REPLACE, la);
            mods.Add (lm);

            if (Util.CheckSamba (entry)) {
                la = new LdapAttribute ("sambaLMPassword", pd.LMPassword);
                lm = new LdapModification (LdapModification.REPLACE, la);
                mods.Add (lm);

                la = new LdapAttribute ("sambaNTPassword", pd.NTPassword);
                lm = new LdapModification (LdapModification.REPLACE, la);
                mods.Add (lm);
            }

            Util.ModifyEntry (conn, entry.DN, mods.ToArray());
        }
コード例 #8
0
ファイル: EditUserViewDialog.cs プロジェクト: MrJoe/lat
        public void OnPasswordClicked(object o, EventArgs args)
        {
            PasswordDialog pd = new PasswordDialog ();

            if (pd.UnixPassword.Equals (""))
                return;

            pass = pd.UnixPassword;
            smbLM = pd.LMPassword;
            smbNT = pd.NTPassword;

            passChanged = true;
        }
コード例 #9
0
ファイル: PasswordAttributeViewer.cs プロジェクト: MrJoe/lat
        public override void OnActivate(string attributeName, string attributeData)
        {
            passwordData = null;
            PasswordDialog pd = new PasswordDialog ();

            if (pd.UnixPassword == null)
                return;

            switch (attributeName.ToLower()) {

            case "userpassword":
                passwordData = pd.UnixPassword;
                break;

            case "sambalmpassword":
                passwordData = pd.LMPassword;
                break;

            case "sambantpassword":
                passwordData = pd.NTPassword;
                break;

            default:
                break;
            }
        }
コード例 #10
0
ファイル: UserDefaultValuesDialog.cs プロジェクト: MrJoe/lat
        public void OnSetPasswordClicked(object o, EventArgs args)
        {
            PasswordDialog pd = new PasswordDialog ();

            if (!passwordEntry.Text.Equals ("") && pd.UnixPassword.Equals (""))
                return;

            passwordEntry.Text = pd.UnixPassword;
            smbLM = pd.LMPassword;
            smbNT = pd.NTPassword;
        }