Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 296233 Details for
Bug 435134
ipa-modgroup should allow groups to be added as a group member
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
allow groups to be added as a group member
freeipa-710-modgroup.patch (text/plain), 4.28 KB, created by
Rob Crittenden
on 2008-02-28 16:33:24 UTC
(
hide
)
Description:
allow groups to be added as a group member
Filename:
MIME Type:
Creator:
Rob Crittenden
Created:
2008-02-28 16:33:24 UTC
Size:
4.28 KB
patch
obsolete
># HG changeset patch ># User Rob Crittenden <rcritten@redhat.com> ># Date 1204216474 18000 ># Node ID 6cda4822300d6c9e559f1dce3f76777d5eb044ff ># Parent 1ce2147fdef549a0d4fca088d18be8316436c8e6 >Allow groups to be added as a group membe > >435134 > >diff -r 1ce2147fdef5 -r 6cda4822300d ipa-admintools/ipa-modgroup >--- a/ipa-admintools/ipa-modgroup Wed Feb 27 16:17:38 2008 -0500 >+++ b/ipa-admintools/ipa-modgroup Thu Feb 28 11:34:34 2008 -0500 >@@ -21,6 +21,7 @@ def usage(): > def usage(): > print "ipa-modgroup [-l|--list]" > print "ipa-modgroup [-a|--add] [-r|--remove] user group" >+ print "ipa-modgroup [-g|--groupadd] [-e|--groupdel] group group" > print "ipa-modgroup [-d|--desc description STRING] [--addattr attribute=value] [--delattr attribute] [--setattr attribute=value] group" > sys.exit(1) > >@@ -33,6 +34,10 @@ def parse_options(): > help="Add a user to the group") > parser.add_option("-r", "--remove", dest="remove", action="store_true", > help="Remove a user from the group") >+ parser.add_option("-g", "--groupadd", dest="groupadd", action="store_true", >+ help="Add a group to the group") >+ parser.add_option("-e", "--groupdel", dest="groupdel", action="store_true", >+ help="Remove a group from the group") > parser.add_option("-d", "--description", dest="desc", > help="Modify the description of the group") > parser.add_option("--addattr", dest="addattr", >@@ -51,8 +56,10 @@ def parse_options(): > args = ipa.config.init_config(sys.argv) > options, args = parser.parse_args(args) > >- if (not options.add and not options.remove) and (not options.desc and >- not options.addattr and not options.delattr and not options.setattr and not options.list): >+ if ((not options.add and not options.remove) and >+ (not options.groupadd and not options.groupdel) and >+ (not options.desc and not options.addattr and >+ not options.delattr and not options.setattr and not options.list)): > usage() > > return options, args >@@ -111,6 +118,30 @@ def main(): > for user in users: > client.remove_user_from_group(user, group.dn) > print user + " successfully removed" >+ elif options.groupadd: >+ group = get_group(client, options, args[2]) >+ if group is None: >+ return 1 >+ groups = args[1].split(',') >+ for g in groups: >+ tgroup = get_group(client, options, g) >+ if tgroup is not None: >+ client.add_group_to_group(tgroup.dn, group.dn) >+ print g + " successfully added to " + args[2] >+ else: >+ print "Group %s not found" % g >+ elif options.groupdel: >+ group = get_group(client, options, args[2]) >+ if group is None: >+ return 1 >+ groups = args[1].split(',') >+ for g in groups: >+ tgroup = get_group(client, options, g) >+ if tgroup is not None: >+ client.remove_member_from_group(tgroup.dn, group.dn) >+ print g + " successfully removed " + args[2] >+ else: >+ print "Group %s not found" % g > else: > group = get_group(client, options, args[1]) > if group is None: >diff -r 1ce2147fdef5 -r 6cda4822300d ipa-admintools/man/ipa-modgroup.1 >--- a/ipa-admintools/man/ipa-modgroup.1 Wed Feb 27 16:17:38 2008 -0500 >+++ b/ipa-admintools/man/ipa-modgroup.1 Thu Feb 28 11:34:34 2008 -0500 >@@ -28,23 +28,24 @@ Updates the members or description of \f > .TP > \fB\-a\fR, \fB\-\-add\fR=\fIuser1,user2,...usern\fR > Add one or more users to the group >- > .TP > \fB\-d\fR, \fB\-\-description\fR=\fIdescription\fR > Modify the description of the group >- >+.TP >+\fB\-e\fR, \fB\-\-groupdel\fR=\fIgroup1,group2,...groupn\fR >+Remove one or more groups from the group >+.TP >+\fB\-g\fR, \fB\-\-groupadd\fR=\fIgroup1,group2,...groupn\fR >+Add one or more groups to the group > .TP > \fB\-r\fR, \fB\-\-remove\fR=\fIuser1,user2,...usern\fR > Remove one or more users from the group >- > .TP > \fB\-\-addattr\fR \fIattr=value\fR > Add a new attribute, or value to an existing attribute >- > .TP > \fB\-\-delattr\fR \fIattr=value\fR > Remove an attribute and all values >- > .TP > \fB\-\-setattr\fR \fIattr=value\fR > Set an attribute to a new value, removing all old ones
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 435134
: 296233