From 7abaada1a725c97b76d4a56980d3a4a44411bfad Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Fri, 9 Aug 2013 10:08:41 -0400 Subject: [PATCH 1/1] ldapfinger: set safer shell options --- ldapfinger | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ldapfinger b/ldapfinger index 62a84f4..548769a 100755 --- a/ldapfinger +++ b/ldapfinger @@ -1,10 +1,11 @@ -#!/bin/bash +#!/bin/sh +set -euf for user in "$@"; do echo ldapsearch -x -h ldap.mit.edu -b dc=mit,dc=edu "uid=$user" ldapsearch -x -h ldap.mit.edu -b dc=mit,dc=edu "uid=$user" done -echo Try also athrun consult ldaps -echo or ldapsearch -x -h ldap-too.mit.edu -b ou=moira,dc=mit,dc=edu "uid=$user" +echo Try also athrun consult ldaps or +echo ldapsearch -x -h ldap-too.mit.edu -b ou=moira,dc=mit,dc=edu "uid=${user:-username}" -- 2.34.1