Browse Source

sudo: need to actually *write* to file to update mtime - this is possibly a kernel issue

K. Lange 2 years ago
parent
commit
c867f6e84b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/sudo.c

+ 1 - 1
apps/sudo.c

@@ -118,7 +118,7 @@ static int sudo_loop(int (*prompt_callback)(char * username, char * password, in
 		}
 
 		/* Write a timestamp file */
-		FILE * f = fopen(token_file, "a");
+		FILE * f = fopen(token_file, "w");
 		if (!f) {
 			fprintf(stderr, "%s: (warning) failed to create token file\n", argv[0]);
 		}