Displaying 2 results from an estimated 2 matches for "7c482e7".
Did you mean:
76482f7
2016 May 19
2
[PATCH 1/2] customize: minor function factoring in ssh_key
...mation from /etc/passwd in a slightly
more generic function, so there is no need to copy&paste for other
details.
Mostly code motion.
---
customize/ssh_key.ml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/customize/ssh_key.ml b/customize/ssh_key.ml
index a4e4a51..7c482e7 100644
--- a/customize/ssh_key.ml
+++ b/customize/ssh_key.ml
@@ -106,13 +106,15 @@ let do_ssh_inject_unix (g : Guestfs.guestfs) user selector =
(* Get user's home directory. *)
g#aug_init "/" 0;
- let home_dir =
+ let read_user_detail what =
try
- let expr = sprint...
2016 May 19
0
[PATCH 2/2] customize: fix ownership when creating ~/.ssh/authorized_keys (RHBZ#1337561)
...creating ~/.ssh and ~/.ssh/authorized_keys (in case they are
missing), change their ownership to the target user. If not, they are
owned by root.
---
customize/ssh_key.ml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/customize/ssh_key.ml b/customize/ssh_key.ml
index 7c482e7..d05816c 100644
--- a/customize/ssh_key.ml
+++ b/customize/ssh_key.ml
@@ -115,20 +115,24 @@ let do_ssh_inject_unix (g : Guestfs.guestfs) user selector =
user
in
let home_dir = read_user_detail "home" in
+ let uid = int_of_string (read_user_detail "uid") in
+ let...