Raymond Toy pushed to branch issue-393-os-common-getpwuid at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/lisp/os-common.c
    ... ... @@ -957,7 +957,11 @@ os_getpwuid(uid_t uid)
    957 957
     again:
    
    958 958
         switch (getpwuid_r(uid, &pwd, buffer, size, &ppwd)) {
    
    959 959
           case 0:
    
    960
    -	  /* Success, though we might not have a matching entry */
    
    960
    +	  /*
    
    961
    +	   * Success, though we might not have a matching entry.  But
    
    962
    +	   * if we do, copy the entry to a new structure and return
    
    963
    +	   * that.
    
    964
    +	   */
    
    961 965
     	  if (ppwd != NULL) {
    
    962 966
     	      result = (struct passwd*) malloc(sizeof(pwd));
    
    963 967
     	      result->pw_name = strdup(pwd.pw_name);
    
    ... ... @@ -967,11 +971,6 @@ again:
    967 971
     	      result->pw_gecos = strdup(pwd.pw_gecos);
    
    968 972
     	      result->pw_dir = strdup(pwd.pw_dir);
    
    969 973
     	      result->pw_shell = strdup(pwd.pw_shell);
    
    970
    -	      printf("pw-name   = %p\n", result->pw_name);
    
    971
    -	      printf("pw-passwd = %p\n", result->pw_passwd);
    
    972
    -	      printf("pw-gecos  = %p\n", result->pw_gecos);
    
    973
    -	      printf("pw_dir    = %p\n", result->pw_dir);
    
    974
    -	      printf("pw_shell  = %p\n", result->pw_shell);
    
    975 974
     	  }
    
    976 975
     	      
    
    977 976
     	  break;