[system-tools-backends-clone] Remove obsolete function modify_shadow_password()
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [system-tools-backends-clone] Remove obsolete function modify_shadow_password()
- Date: Mon, 8 Feb 2010 22:43:48 +0000 (UTC)
commit a1f7308a9a05cfc1016c95ff5e511d6111b8d134
Author: Milan Bouchet-Valat <nalimilan club fr>
Date: Sun Feb 7 21:31:39 2010 +0100
Remove obsolete function modify_shadow_password()
This is not used since we use platform tools to set password.
Users/Users.pm | 28 ----------------------------
1 files changed, 0 insertions(+), 28 deletions(-)
---
diff --git a/Users/Users.pm b/Users/Users.pm
index 523aa2a..4f4cb68 100644
--- a/Users/Users.pm
+++ b/Users/Users.pm
@@ -464,34 +464,6 @@ sub change_user_chfn
&Utils::File::run (@command);
}
-# modifies /etc/shadow directly, not good practice,
-# but better than passing clean passwords around
-sub modify_shadow_password
-{
- my ($login, $password) = @_;
- my ($buffer, $i, @arr);
-
- $buffer = &Utils::File::load_buffer (@shadow_names);
- return if (!$buffer);
- $i = 0;
-
- while ($$buffer[$i])
- {
- @arr = split ':', $$buffer[$i], -1;
-
- if ($arr[0] eq $login)
- {
- $arr[1] = $password;
- $$buffer[$i] = join (':', @arr) . "\n";
- last;
- }
-
- $i++;
- }
-
- &Utils::File::save_buffer ($buffer, @shadow_names);
-}
-
sub set_passwd
{
my ($login, $password) = @_;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]