diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 01:35:06 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 02:11:48 +0200 |
commit | 1a64deeb894dc95e2645a75771732c6cc53a79ad (patch) | |
tree | 1b9df4838f894577a09b9b260151756272efeb53 /modules/private/ssh/ldap_regular.sh | |
parent | fa25ffd4583cc362075cd5e1b4130f33306103f0 (diff) | |
download | Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip |
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them
contained personnal information about users. All thos changes got
stashed into a single commit (history is kept in a different place) and
private information was moved in a separate private repository
Diffstat (limited to 'modules/private/ssh/ldap_regular.sh')
-rw-r--r-- | modules/private/ssh/ldap_regular.sh | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/modules/private/ssh/ldap_regular.sh b/modules/private/ssh/ldap_regular.sh deleted file mode 100644 index 4c2f47e..0000000 --- a/modules/private/ssh/ldap_regular.sh +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | ### This snippet is not standalone and must be integrated in the global ldap_authorized_keys.sh | ||
2 | LDAP_MEMBER="cn=users,cn=ssh,ou=services,dc=immae,dc=eu" | ||
3 | |||
4 | ldap_search '(&(memberOf='$LDAP_MEMBER')('$KEY'=*)(uid='$user'))' $KEY | \ | ||
5 | while read line ; | ||
6 | do | ||
7 | if [ ! -z "$line" ]; then | ||
8 | if [[ $line == dn* ]]; then | ||
9 | user=$(sed -n 's/.*uid=\([^,]*\).*/\1/p' <<< "$line") | ||
10 | elif [[ $line == $KEY* ]]; then | ||
11 | key=$(clean_key_line ssh "$line") | ||
12 | if [ ! -z "$key" ]; then | ||
13 | if [[ $key != *$'\n'* ]] && [[ $key == ssh-* ]]; then | ||
14 | echo $key | ||
15 | fi | ||
16 | fi | ||
17 | fi | ||
18 | fi | ||
19 | done | ||