Displaying 1 result from an estimated 1 matches for "tmpend".
Did you mean:
  tmp_end
  
2000 Jul 09
0
OpenSSH 2.1.1p2: /etc/nologin handling and related stuff
...rintf(stderr, "\aLogins are currently disallowed:\n\n");
 		while (fgets(buf, sizeof(buf), f))
 			fputs(buf, stderr);
+		fprintf(stderr, "\n");
 		fclose(f);
-		if (pw->pw_uid != 0)
+#ifdef NOLOGIN_ALLOW_FILE
+		if((f=fopen(NOLOGIN_ALLOW_FILE, "r"))) {
+		    char *tmpend;
+		    while (fgets(buf, sizeof(buf), f)) {
+			if(*buf=='\0' || *buf=='#' || *buf=='\n' || *buf=='\r')
+			    continue;
+			if((tmpend=strchr(buf, '\n')))
+			    *tmpend='\0';
+			if(!strcmp(buf, pw->pw_name)) {
+			    notallowed=0;
+			    br...