chiark
/
gitweb
/
~ian
/
authbind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
introduce checkexecflagfile
[authbind.git]
/
authbind.c
diff --git
a/authbind.c
b/authbind.c
index 028ccbffc40409d4d620aa82561173a7346b9db7..484f0e74f332f1d9a87a33eed7386832934724d1 100644
(file)
--- a/
authbind.c
+++ b/
authbind.c
@@
-27,14
+27,12
@@
#include "authbind.h"
#include "authbind.h"
-static const char *rcsid="$Id$";
-
static void printusage(FILE *f) {
if (fprintf(f,
"usage: authbind [<options>] <program> <arg> <arg> ...\n"
"options: --deep --depth <levels>\n"
static void printusage(FILE *f) {
if (fprintf(f,
"usage: authbind [<options>] <program> <arg> <arg> ...\n"
"options: --deep --depth <levels>\n"
- "version: " MAJOR_VER "." MINOR_VER "
%s\n",
-
rcsid)
== EOF) { perror("printf usage"); exit(-1); }
+ "version: " MAJOR_VER "." MINOR_VER "
\n")
+ == EOF) { perror("printf usage"); exit(-1); }
}
static void usageerror(const char *msg) {
}
static void usageerror(const char *msg) {
@@
-57,7
+55,7
@@
int main(int argc, char *const *argv) {
while (argc>1 && argv[1][0]=='-') {
argc--; argv++;
if (!argv[0][1]) break;
while (argc>1 && argv[1][0]=='-') {
argc--; argv++;
if (!argv[0][1]) break;
- if (!strcmp("--deep",argv[0])) { depth=
-1
; }
+ if (!strcmp("--deep",argv[0])) { depth=
0
; }
else if (!strcmp("--depth",argv[0])) {
if (argc<=1) usageerror("--depth requires a value");
argc--; argv++;
else if (!strcmp("--depth",argv[0])) {
if (argc<=1) usageerror("--depth requires a value");
argc--; argv++;
@@
-90,7
+88,7
@@
int main(int argc, char *const *argv) {
if (depth > 1) {
sprintf(buf,"%ld",depth-1);
mustsetenv(AUTHBIND_LEVELS_VAR,buf);
if (depth > 1) {
sprintf(buf,"%ld",depth-1);
mustsetenv(AUTHBIND_LEVELS_VAR,buf);
- } else if (depth ==
-1
) {
+ } else if (depth ==
0
) {
mustsetenv(AUTHBIND_LEVELS_VAR,"y");
} else {
assert(depth==1);
mustsetenv(AUTHBIND_LEVELS_VAR,"y");
} else {
assert(depth==1);