void-packages/srcpkgs/cinnamon/patches/set_wheel.patch

51 lines
2.5 KiB
Diff
Raw Normal View History

2015-11-09 05:10:51 +00:00
--- ./files/usr/share/cinnamon/cinnamon-settings-users/cinnamon-settings-users.py.orig 2015-11-08 23:37:01.916659699 -0500
+++ ./files/usr/share/cinnamon/cinnamon-settings-users/cinnamon-settings-users.py 2015-11-08 23:40:33.305652057 -0500
@@ -147,7 +147,7 @@
2014-08-30 16:39:43 +00:00
class PasswordDialog(Gtk.Dialog):
2015-11-09 05:10:51 +00:00
- def __init__ (self, user, password_mask, group_mask):
2014-08-30 16:39:43 +00:00
+ def __init__ (self, user, password_mask):
super(PasswordDialog, self).__init__()
self.user = user
2015-11-09 05:10:51 +00:00
@@ -219,13 +219,7 @@
2014-08-30 16:39:43 +00:00
newpass = self.new_password.get_text()
self.user.set_password(newpass, "")
2015-06-07 18:16:30 +00:00
mask = self.group_mask.get_text()
- if "nopasswdlogin" in mask:
2015-11-09 05:10:51 +00:00
- subprocess.call(["gpasswd", "-d", self.user.get_user_name(), "nopasswdlogin"])
2015-06-07 18:16:30 +00:00
- mask = mask.split(", ")
- mask.remove("nopasswdlogin")
- mask = ", ".join(mask)
- self.group_mask.set_text(mask)
- self.password_mask.set_text(u'\u2022\u2022\u2022\u2022\u2022\u2022')
+ self.password_mask.set_text(u'\u2022\u2022\u2022\u2022\u2022\u2022')
2015-11-09 05:10:51 +00:00
self.destroy()
2014-08-30 16:39:43 +00:00
2015-06-07 18:16:30 +00:00
def set_passwords_visibility(self):
2015-11-09 05:10:51 +00:00
@@ -563,7 +557,7 @@
2014-08-30 16:39:43 +00:00
model, treeiter = self.users_treeview.get_selection().get_selected()
if treeiter != None:
2015-11-09 05:10:51 +00:00
user = model[treeiter][INDEX_USER_OBJECT]
- dialog = PasswordDialog(user, self.password_mask, self.groups_label)
2014-08-30 16:39:43 +00:00
+ dialog = PasswordDialog(user, self.password_mask)
response = dialog.run()
2015-11-09 05:10:51 +00:00
def _on_groups_button_clicked(self, widget):
@@ -808,11 +802,11 @@
2014-08-30 16:39:43 +00:00
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size("/usr/share/cinnamon/faces/user-generic.png", 48, 48)
description = "<b>%s</b>\n%s" % (fullname, username)
piter = self.users.append(None, [new_user, pixbuf, description])
- # Add the user to his/her own group and sudo if Administrator was selected
+ # Add the user to his/her own group and wheel if Administrator was selected
if dialog.account_type_combo.get_active() == 1:
2015-11-09 05:10:51 +00:00
- subprocess.call(["usermod", username, "-G", "%s,sudo,nopasswdlogin" % username])
2014-08-30 16:39:43 +00:00
+ os.system("usermod %s -G %s,wheel" % (username, username))
else:
2015-11-09 05:10:51 +00:00
- subprocess.call(["usermod", username, "-G", "%s,nopasswdlogin" % username])
2014-08-30 16:39:43 +00:00
+ os.system("usermod %s -G %s" % (username, username))
self.load_groups()
dialog.destroy()
2015-11-09 05:10:51 +00:00