patches for easier mirroring, to eliminate a special copy, to make www.freebsd.org/security a full copy of security.freebsd.org and be eventually be the same. For now files are just sitting there. The symlinks are missing. Discussed on: www (repository location) Discussed with: simon (so)
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			564 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			564 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
| --- contrib/opie/opiepasswd.c
 | |
| +++ contrib/opie/opiepasswd.c
 | |
| @@ -118,11 +118,18 @@
 | |
|    struct opie opie;
 | |
|    int rval, n = 499, i, mode = MODE_DEFAULT, force = 0;
 | |
|    char seed[OPIE_SEED_MAX+1];
 | |
| +  char *username;
 | |
| +  uid_t ruid;
 | |
|    struct passwd *pp;
 | |
|  
 | |
|    memset(seed, 0, sizeof(seed));
 | |
|  
 | |
| -  if (!(pp = getpwnam(getlogin()))) {
 | |
| +  ruid = getuid();
 | |
| +  username = getlogin();
 | |
| +  pp = getpwnam(username);
 | |
| +  if (username == NULL || pp == NULL || pp->pw_uid != ruid)
 | |
| +    pp = getpwuid(ruid);
 | |
| +  if (pp == NULL) {
 | |
|      fprintf(stderr, "Who are you?");
 | |
|      return 1;
 | |
|    }
 |