[389-ds-base] branch 389-ds-base-1.4.3 updated: Issue 51228 - Fix lock/unlock wording and lib389 use of methods
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch 389-ds-base-1.4.3
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.3 by this push:
new 2cd634e Issue 51228 - Fix lock/unlock wording and lib389 use of methods
2cd634e is described below
commit 2cd634ebe5fac2c8fbebe4871ea16c1f402ed64d
Author: Simon Pichugin <spichugi(a)redhat.com>
AuthorDate: Thu Aug 27 14:06:37 2020 +0200
Issue 51228 - Fix lock/unlock wording and lib389 use of methods
Descriptions: Clean up lib389 idm-account methods to presicely locate
CoS objects. Also, fix AccountPolicyEntry super() function.
Fix wording in user input requests while doing lock/unlock.
https://pagure.io/389-ds-base/issue/51228
Reviewed by: mreynolds (Thanks!)
---
src/lib389/lib389/cli_idm/account.py | 4 ++--
src/lib389/lib389/idm/account.py | 4 +++-
src/lib389/lib389/plugins.py | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/lib389/lib389/cli_idm/account.py b/src/lib389/lib389/cli_idm/account.py
index 960eb8e..3e9f37e 100644
--- a/src/lib389/lib389/cli_idm/account.py
+++ b/src/lib389/lib389/cli_idm/account.py
@@ -96,7 +96,7 @@ def subtree_status(inst, basedn, log, args):
def lock(inst, basedn, log, args):
- dn = _get_dn_arg(args.dn, msg="Enter dn to check")
+ dn = _get_dn_arg(args.dn, msg="Enter dn to lock")
accounts = Accounts(inst, basedn)
acct = accounts.get(dn=dn)
acct.lock()
@@ -104,7 +104,7 @@ def lock(inst, basedn, log, args):
def unlock(inst, basedn, log, args):
- dn = _get_dn_arg(args.dn, msg="Enter dn to check")
+ dn = _get_dn_arg(args.dn, msg="Enter dn to unlock")
accounts = Accounts(inst, basedn)
acct = accounts.get(dn=dn)
acct.unlock()
diff --git a/src/lib389/lib389/idm/account.py b/src/lib389/lib389/idm/account.py
index c772b66..666b623 100644
--- a/src/lib389/lib389/idm/account.py
+++ b/src/lib389/lib389/idm/account.py
@@ -105,7 +105,9 @@ class Account(DSLdapObject):
spec_attr = self._dict_get_with_ignore_indexerror(config_settings, "specattrname")
limit_attr = self._dict_get_with_ignore_indexerror(config_settings, "limitattrname")
- cos_entries = CosTemplates(inst, self.dn)
+ mapping_trees = MappingTrees(inst)
+ root_suffix = mapping_trees.get_root_suffix_by_entry(self.dn)
+ cos_entries = CosTemplates(inst, root_suffix)
accpol_entry_dn = ""
for cos in cos_entries.list():
if cos.present(spec_attr):
diff --git a/src/lib389/lib389/plugins.py b/src/lib389/lib389/plugins.py
index 89e6602..e7ef2df 100644
--- a/src/lib389/lib389/plugins.py
+++ b/src/lib389/lib389/plugins.py
@@ -1881,7 +1881,7 @@ class AccountPolicyEntry(DSLdapObject):
"""
def __init__(self, instance, dn=None):
- super(AccountPolicyConfig, self).__init__(instance, dn)
+ super(AccountPolicyEntry, self).__init__(instance, dn)
self._rdn_attribute = 'cn'
self._must_attributes = ['cn']
self._create_objectclasses = ['top', 'accountpolicy']
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
2 years, 9 months
[389-ds-base] branch 389-ds-base-1.4.2 updated: Issue 51228 - Fix lock/unlock wording and lib389 use of methods
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new f2e70bb Issue 51228 - Fix lock/unlock wording and lib389 use of methods
f2e70bb is described below
commit f2e70bbe18dedb9e03aba604d3ccdad7a3f0b806
Author: Simon Pichugin <spichugi(a)redhat.com>
AuthorDate: Thu Aug 27 14:06:37 2020 +0200
Issue 51228 - Fix lock/unlock wording and lib389 use of methods
Descriptions: Clean up lib389 idm-account methods to presicely locate
CoS objects. Also, fix AccountPolicyEntry super() function.
Fix wording in user input requests while doing lock/unlock.
https://pagure.io/389-ds-base/issue/51228
Reviewed by: mreynolds (Thanks!)
---
src/lib389/lib389/cli_idm/account.py | 4 ++--
src/lib389/lib389/idm/account.py | 4 +++-
src/lib389/lib389/plugins.py | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/lib389/lib389/cli_idm/account.py b/src/lib389/lib389/cli_idm/account.py
index 960eb8e..3e9f37e 100644
--- a/src/lib389/lib389/cli_idm/account.py
+++ b/src/lib389/lib389/cli_idm/account.py
@@ -96,7 +96,7 @@ def subtree_status(inst, basedn, log, args):
def lock(inst, basedn, log, args):
- dn = _get_dn_arg(args.dn, msg="Enter dn to check")
+ dn = _get_dn_arg(args.dn, msg="Enter dn to lock")
accounts = Accounts(inst, basedn)
acct = accounts.get(dn=dn)
acct.lock()
@@ -104,7 +104,7 @@ def lock(inst, basedn, log, args):
def unlock(inst, basedn, log, args):
- dn = _get_dn_arg(args.dn, msg="Enter dn to check")
+ dn = _get_dn_arg(args.dn, msg="Enter dn to unlock")
accounts = Accounts(inst, basedn)
acct = accounts.get(dn=dn)
acct.unlock()
diff --git a/src/lib389/lib389/idm/account.py b/src/lib389/lib389/idm/account.py
index 7a62697..0e23ea0 100644
--- a/src/lib389/lib389/idm/account.py
+++ b/src/lib389/lib389/idm/account.py
@@ -104,7 +104,9 @@ class Account(DSLdapObject):
spec_attr = self._dict_get_with_ignore_indexerror(config_settings, "specattrname")
limit_attr = self._dict_get_with_ignore_indexerror(config_settings, "limitattrname")
- cos_entries = CosTemplates(inst, self.dn)
+ mapping_trees = MappingTrees(inst)
+ root_suffix = mapping_trees.get_root_suffix_by_entry(self.dn)
+ cos_entries = CosTemplates(inst, root_suffix)
accpol_entry_dn = ""
for cos in cos_entries.list():
if cos.present(spec_attr):
diff --git a/src/lib389/lib389/plugins.py b/src/lib389/lib389/plugins.py
index a12e579..8577135 100644
--- a/src/lib389/lib389/plugins.py
+++ b/src/lib389/lib389/plugins.py
@@ -1881,7 +1881,7 @@ class AccountPolicyEntry(DSLdapObject):
"""
def __init__(self, instance, dn=None):
- super(AccountPolicyConfig, self).__init__(instance, dn)
+ super(AccountPolicyEntry, self).__init__(instance, dn)
self._rdn_attribute = 'cn'
self._must_attributes = ['cn']
self._create_objectclasses = ['top', 'accountpolicy']
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
2 years, 9 months
[389-ds-base] branch 389-ds-base-1.4.3 updated: Issue 51229 - Server Settings page gets into an unresponsive state
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch 389-ds-base-1.4.3
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.3 by this push:
new cd7b96f Issue 51229 - Server Settings page gets into an unresponsive state
cd7b96f is described below
commit cd7b96f21d2f1e40a299d6d5a1b88bc52196dff3
Author: Simon Pichugin <spichugi(a)redhat.com>
AuthorDate: Tue Aug 18 15:52:32 2020 +0200
Issue 51229 - Server Settings page gets into an unresponsive state
Bug Description: If we switch the tab in Cockpit UI and restart
the instance - we can't go back to the default tab as it's in
an unresponsive loading state.
Fix Description: Do the update on ComponentDidUpdate instead of
ComponentDidMount.
https://pagure.io/389-ds-base/issue/51229
Reviewed by: mreynolds (Thanks!)
---
src/cockpit/389-console/src/server.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cockpit/389-console/src/server.jsx b/src/cockpit/389-console/src/server.jsx
index 98cceb6..27193b7 100644
--- a/src/cockpit/389-console/src/server.jsx
+++ b/src/cockpit/389-console/src/server.jsx
@@ -35,7 +35,7 @@ export class Server extends React.Component {
this.selectNode = this.selectNode.bind(this);
}
- componentDidMount() {
+ componentDidUpdate() {
if (this.props.wasActiveList.includes(1)) {
if (this.state.firstLoad) {
this.loadConfig();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
2 years, 9 months
[389-ds-base] branch 389-ds-base-1.4.2 updated: Issue 51229 - Server Settings page gets into an unresponsive state
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new a50b014 Issue 51229 - Server Settings page gets into an unresponsive state
a50b014 is described below
commit a50b0149405ad7f851f1807fcda78ab927c4cbbc
Author: Simon Pichugin <spichugi(a)redhat.com>
AuthorDate: Tue Aug 18 15:52:32 2020 +0200
Issue 51229 - Server Settings page gets into an unresponsive state
Bug Description: If we switch the tab in Cockpit UI and restart
the instance - we can't go back to the default tab as it's in
an unresponsive loading state.
Fix Description: Do the update on ComponentDidUpdate instead of
ComponentDidMount.
https://pagure.io/389-ds-base/issue/51229
Reviewed by: mreynolds (Thanks!)
---
src/cockpit/389-console/src/server.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cockpit/389-console/src/server.jsx b/src/cockpit/389-console/src/server.jsx
index 98cceb6..27193b7 100644
--- a/src/cockpit/389-console/src/server.jsx
+++ b/src/cockpit/389-console/src/server.jsx
@@ -35,7 +35,7 @@ export class Server extends React.Component {
this.selectNode = this.selectNode.bind(this);
}
- componentDidMount() {
+ componentDidUpdate() {
if (this.props.wasActiveList.includes(1)) {
if (this.state.firstLoad) {
this.loadConfig();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
2 years, 9 months
[389-ds-base] branch 389-ds-base-1.4.2 updated: Issue 51165 - Set the operation start time for extended ops
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new 1b05d81 Issue 51165 - Set the operation start time for extended ops
1b05d81 is described below
commit 1b05d81a213dabed9601400797da4df51d5856ed
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Mon Aug 17 09:20:07 2020 -0400
Issue 51165 - Set the operation start time for extended ops
Bug Description: Extended ops, likewhat is used in replication, were not
setting the operation start time. This caused invalid
values in the new access log keywords (wtime & optime)
Fix Description: Set the start start at the start of the extended op.
Fixes: https://pagure.io/389-ds-base/issue/51165
Reviewed by: mreynolds (one line commit rule)
---
ldap/servers/slapd/extendop.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ldap/servers/slapd/extendop.c b/ldap/servers/slapd/extendop.c
index f9f19d3..6aba026 100644
--- a/ldap/servers/slapd/extendop.c
+++ b/ldap/servers/slapd/extendop.c
@@ -221,6 +221,9 @@ do_extended(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_OPERATION, &pb_op);
slapi_pblock_get(pb, SLAPI_CONNECTION, &pb_conn);
+ /* Set the time we actually started the operation */
+ slapi_operation_set_time_started(pb_op);
+
if (pb_conn == NULL || pb_op == NULL) {
send_ldap_result(pb, LDAP_OPERATIONS_ERROR, NULL, "param error", 0, NULL);
slapi_log_err(SLAPI_LOG_ERR, "do_extended",
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
2 years, 9 months
[389-ds-base] branch 389-ds-base-1.4.3 updated: Issue 51165 - Set the operation start time for extended ops
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.3
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.3 by this push:
new 25eaefe Issue 51165 - Set the operation start time for extended ops
25eaefe is described below
commit 25eaefe06cee20081c4bd89b2d3c762213a35652
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Mon Aug 17 09:20:07 2020 -0400
Issue 51165 - Set the operation start time for extended ops
Bug Description: Extended ops, likewhat is used in replication, were not
setting the operation start time. This caused invalid
values in the new access log keywords (wtime & optime)
Fix Description: Set the start start at the start of the extended op.
Fixes: https://pagure.io/389-ds-base/issue/51165
Reviewed by: mreynolds (one line commit rule)
---
ldap/servers/slapd/extendop.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ldap/servers/slapd/extendop.c b/ldap/servers/slapd/extendop.c
index 4ebbeca..2c2f9c7 100644
--- a/ldap/servers/slapd/extendop.c
+++ b/ldap/servers/slapd/extendop.c
@@ -279,6 +279,9 @@ do_extended(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_OPERATION, &pb_op);
slapi_pblock_get(pb, SLAPI_CONNECTION, &pb_conn);
+ /* Set the time we actually started the operation */
+ slapi_operation_set_time_started(pb_op);
+
if (pb_conn == NULL || pb_op == NULL) {
send_ldap_result(pb, LDAP_OPERATIONS_ERROR, NULL, "param error", 0, NULL);
slapi_log_err(SLAPI_LOG_ERR, "do_extended",
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
2 years, 9 months
[389-ds-base] branch master updated: Issue 51165 - Set the operation start time for extended ops
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new dda3ab0 Issue 51165 - Set the operation start time for extended ops
dda3ab0 is described below
commit dda3ab0da56c42aa529bca35d7a05604f2076f75
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Mon Aug 17 09:20:07 2020 -0400
Issue 51165 - Set the operation start time for extended ops
Bug Description: Extended ops, likewhat is used in replication, were not
setting the operation start time. This caused invalid
values in the new access log keywords (wtime & optime)
Fix Description: Set the start start at the start of the extended op.
Fixes: https://pagure.io/389-ds-base/issue/51165
Reviewed by: mreynolds (one line commit rule)
---
ldap/servers/slapd/extendop.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ldap/servers/slapd/extendop.c b/ldap/servers/slapd/extendop.c
index 4ebbeca..2c2f9c7 100644
--- a/ldap/servers/slapd/extendop.c
+++ b/ldap/servers/slapd/extendop.c
@@ -279,6 +279,9 @@ do_extended(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_OPERATION, &pb_op);
slapi_pblock_get(pb, SLAPI_CONNECTION, &pb_conn);
+ /* Set the time we actually started the operation */
+ slapi_operation_set_time_started(pb_op);
+
if (pb_conn == NULL || pb_op == NULL) {
send_ldap_result(pb, LDAP_OPERATIONS_ERROR, NULL, "param error", 0, NULL);
slapi_log_err(SLAPI_LOG_ERR, "do_extended",
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
2 years, 9 months
[389-ds-base] branch master updated: Issue 50933 - Fix OID change between 10rfc2307 and 10rfc2307compat
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new 5afcbb0 Issue 50933 - Fix OID change between 10rfc2307 and 10rfc2307compat
5afcbb0 is described below
commit 5afcbb0d53e06aee85373df32c87bf830d41c251
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Wed Aug 12 12:46:42 2020 -0400
Issue 50933 - Fix OID change between 10rfc2307 and 10rfc2307compat
Bug Description: 10rfc2307compat changed the OID for nisMap objectclass to
match the standard OID, but this breaks replication with
older versions of DS.
Fix Description: Continue to use the old(invalid?) oid for nisMap so that
replication does not break in a mixed version environment.
Fixes: https://pagure.io/389-ds-base/issue/50933
Reviewed by: firstyear & tbordaz(Thanks!!)
---
ldap/schema/10rfc2307compat.ldif | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ldap/schema/10rfc2307compat.ldif b/ldap/schema/10rfc2307compat.ldif
index 78c588d..8ba72e1 100644
--- a/ldap/schema/10rfc2307compat.ldif
+++ b/ldap/schema/10rfc2307compat.ldif
@@ -253,7 +253,7 @@ objectClasses: (
MAY ( nisNetgroupTriple $ memberNisNetgroup $ description )
)
objectClasses: (
- 1.3.6.1.1.1.2.9 NAME 'nisMap' SUP top STRUCTURAL
+ 1.3.6.1.1.1.2.13 NAME 'nisMap' SUP top STRUCTURAL
DESC 'A generic abstraction of a NIS map'
MUST nisMapName
MAY description
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
2 years, 9 months
[389-ds-base] branch 389-ds-base-1.4.3 updated: Issue 51228 - Clean up dsidm user status command
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch 389-ds-base-1.4.3
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.3 by this push:
new 357d28b Issue 51228 - Clean up dsidm user status command
357d28b is described below
commit 357d28bd2caa57bf8393b9171b03d6d209111a30
Author: Simon Pichugin <spichugi(a)redhat.com>
AuthorDate: Tue Aug 11 14:43:29 2020 +0200
Issue 51228 - Clean up dsidm user status command
Description: ns-accountstatus.pl, ns-activate.pl and ns-inactivate.pl
were ported to lib389 CLI. The functionality was added to dsidm account/role entry-status,
dsidm account subtree-status, dsidm role lock/unlock, dsidm account lock/unlock.
Remove dsidm user status/lock/unlock commands as they are redundant.
https://pagure.io/389-ds-base/issue/50206
https://pagure.io/389-ds-base/issue/51228
Reviewed by: mreynolds (Thanks!)
---
src/lib389/lib389/cli_idm/user.py | 35 -----------------------------------
1 file changed, 35 deletions(-)
diff --git a/src/lib389/lib389/cli_idm/user.py b/src/lib389/lib389/cli_idm/user.py
index a014541..426570a 100644
--- a/src/lib389/lib389/cli_idm/user.py
+++ b/src/lib389/lib389/cli_idm/user.py
@@ -50,28 +50,6 @@ def modify(inst, basedn, log, args, warn=True):
rdn = _get_arg( args.selector, msg="Enter %s to retrieve" % RDN)
_generic_modify(inst, basedn, log.getChild('_generic_modify'), MANY, rdn, args)
-def status(inst, basedn, log, args):
- uid = _get_arg( args.uid, msg="Enter %s to check" % RDN)
- uas = MANY(inst, basedn)
- acct = uas.get(uid)
- acct_str = "locked: %s" % acct.is_locked()
- log.info('uid: %s' % uid)
- log.info(acct_str)
-
-def lock(inst, basedn, log, args):
- uid = _get_arg( args.uid, msg="Enter %s to check" % RDN)
- accounts = MANY(inst, basedn)
- acct = accounts.get(uid)
- acct.lock()
- log.info('locked %s' % uid)
-
-def unlock(inst, basedn, log, args):
- uid = _get_arg( args.uid, msg="Enter %s to check" % RDN)
- accounts = MANY(inst, basedn)
- acct = accounts.get(uid)
- acct.unlock()
- log.info('unlocked %s' % uid)
-
def create_parser(subparsers):
user_parser = subparsers.add_parser('user', help='Manage posix users')
@@ -101,17 +79,4 @@ def create_parser(subparsers):
delete_parser.set_defaults(func=delete)
delete_parser.add_argument('dn', nargs='?', help='The dn to delete')
- lock_parser = subcommands.add_parser('lock', help='lock')
- lock_parser.set_defaults(func=lock)
- lock_parser.add_argument('uid', nargs='?', help='The uid to lock')
-
- status_parser = subcommands.add_parser('status', help='status')
- status_parser.set_defaults(func=status)
- status_parser.add_argument('uid', nargs='?', help='The uid to check')
-
- unlock_parser = subcommands.add_parser('unlock', help='unlock')
- unlock_parser.set_defaults(func=unlock)
- unlock_parser.add_argument('uid', nargs='?', help='The uid to unlock')
-
-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
2 years, 9 months
[389-ds-base] branch 389-ds-base-1.4.2 updated: Issue 51228 - Clean up dsidm user status command
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new 674dc76 Issue 51228 - Clean up dsidm user status command
674dc76 is described below
commit 674dc76bf82c19cea69451025da43c7a3eb50de2
Author: Simon Pichugin <spichugi(a)redhat.com>
AuthorDate: Tue Aug 11 14:43:29 2020 +0200
Issue 51228 - Clean up dsidm user status command
Description: ns-accountstatus.pl, ns-activate.pl and ns-inactivate.pl
were ported to lib389 CLI. The functionality was added to dsidm account/role entry-status,
dsidm account subtree-status, dsidm role lock/unlock, dsidm account lock/unlock.
Remove dsidm user status/lock/unlock commands as they are redundant.
https://pagure.io/389-ds-base/issue/50206
https://pagure.io/389-ds-base/issue/51228
Reviewed by: mreynolds (Thanks!)
---
src/lib389/lib389/cli_idm/user.py | 35 -----------------------------------
1 file changed, 35 deletions(-)
diff --git a/src/lib389/lib389/cli_idm/user.py b/src/lib389/lib389/cli_idm/user.py
index a014541..426570a 100644
--- a/src/lib389/lib389/cli_idm/user.py
+++ b/src/lib389/lib389/cli_idm/user.py
@@ -50,28 +50,6 @@ def modify(inst, basedn, log, args, warn=True):
rdn = _get_arg( args.selector, msg="Enter %s to retrieve" % RDN)
_generic_modify(inst, basedn, log.getChild('_generic_modify'), MANY, rdn, args)
-def status(inst, basedn, log, args):
- uid = _get_arg( args.uid, msg="Enter %s to check" % RDN)
- uas = MANY(inst, basedn)
- acct = uas.get(uid)
- acct_str = "locked: %s" % acct.is_locked()
- log.info('uid: %s' % uid)
- log.info(acct_str)
-
-def lock(inst, basedn, log, args):
- uid = _get_arg( args.uid, msg="Enter %s to check" % RDN)
- accounts = MANY(inst, basedn)
- acct = accounts.get(uid)
- acct.lock()
- log.info('locked %s' % uid)
-
-def unlock(inst, basedn, log, args):
- uid = _get_arg( args.uid, msg="Enter %s to check" % RDN)
- accounts = MANY(inst, basedn)
- acct = accounts.get(uid)
- acct.unlock()
- log.info('unlocked %s' % uid)
-
def create_parser(subparsers):
user_parser = subparsers.add_parser('user', help='Manage posix users')
@@ -101,17 +79,4 @@ def create_parser(subparsers):
delete_parser.set_defaults(func=delete)
delete_parser.add_argument('dn', nargs='?', help='The dn to delete')
- lock_parser = subcommands.add_parser('lock', help='lock')
- lock_parser.set_defaults(func=lock)
- lock_parser.add_argument('uid', nargs='?', help='The uid to lock')
-
- status_parser = subcommands.add_parser('status', help='status')
- status_parser.set_defaults(func=status)
- status_parser.add_argument('uid', nargs='?', help='The uid to check')
-
- unlock_parser = subcommands.add_parser('unlock', help='unlock')
- unlock_parser.set_defaults(func=unlock)
- unlock_parser.add_argument('uid', nargs='?', help='The uid to unlock')
-
-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
2 years, 9 months