projects
/
user
/
alex
/
software
/
my-snippets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
99d0ec1
)
ldapfinger: set safer shell options
author
Alex Dehnert
<adehnert@mit.edu>
Fri, 9 Aug 2013 14:08:41 +0000
(10:08 -0400)
committer
Alex Dehnert
<adehnert@mit.edu>
Fri, 9 Aug 2013 14:08:41 +0000
(10:08 -0400)
ldapfinger
patch
|
blob
|
history
diff --git
a/ldapfinger
b/ldapfinger
index 62a84f49a15608d456a51080f07fb91b470cffbb..548769ae6f0de746fef36f9f11d64e3220b921fd 100755
(executable)
--- a/
ldapfinger
+++ b/
ldapfinger
@@
-1,10
+1,11
@@
-#!/bin/
ba
sh
+#!/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
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}
"