Commit 1bd7e0aa78bc73c4e64c2bf6b23ae4755ec8bfea

Thomas de Grivel 2020-03-09T11:58:19

more precise group grepping

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/unix/probes.lisp b/unix/probes.lisp
index b19bd6a..4ea3209 100644
--- a/unix/probes.lisp
+++ b/unix/probes.lisp
@@ -24,7 +24,7 @@
   (let ((id (resource-id group))
         (ensure :absent))
     (multiple-value-bind #1=(name passwd gid members)
-        (with-group<5> #1# (grep (str id) "/etc/group")
+        (with-group<5> #1# (egrep (str "^" id ":") "/etc/group")
           (when (string= id name)
             (setq ensure nil)
             (return (values* #1#))))