+ if (lstat(rhosts, &sbuf) < 0)
+ goto again;
+ if ((sbuf.st_mode & S_IFMT) == S_IFLNK) {
+ printf("login: .rhosts is a soft link.\r\n");
+ goto abnormal;
+ }
+ hostf = fopen(rhosts, "r");
+ fstat(fileno(hostf), &sbuf);
+ if ((int) sbuf.st_uid != pwd->pw_uid &&
+ (int) sbuf.st_uid != 0) {
+ printf("login: Bad .rhosts ownership.\r\n");
+ fclose(hostf);
+ goto abnormal;
+ }
+ goto again;