Hello,

Got some segmentation fauls...

Best Regards,
Alon Bar-Lev.

---

diff -urNp ecryptfs-utils-23/src/key_mod/ecryptfs_key_mod_openssl.c 
ecryptfs-utils-23.new/src/key_mod/ecryptfs_key_mod_openssl.c
--- ecryptfs-utils-23/src/key_mod/ecryptfs_key_mod_openssl.c    2007-08-20 
14:54:16.000000000 +0300
+++ ecryptfs-utils-23.new/src/key_mod/ecryptfs_key_mod_openssl.c        
2007-10-03 12:01:40.000000000 +0200
@@ -941,6 +941,10 @@ static int ecryptfs_openssl_init(char **
        }
        id = getuid();
        pw = getpwuid(id);
+       if (!pw) {
+               rc = -EIO;
+               goto out;
+       }
        if ((rc = asprintf(&ssl_param_nodes[SSL_FILE_TOK].suggested_val,
                           "%s/.ecryptfs/pki/openssl/key.pem",
                           pw->pw_dir)) == -1) {
diff -urNp ecryptfs-utils-23/src/libecryptfs/cmd_ln_parser.c 
ecryptfs-utils-23.new/src/libecryptfs/cmd_ln_parser.c
--- ecryptfs-utils-23/src/libecryptfs/cmd_ln_parser.c   2007-08-20 
14:54:16.000000000 +0300
+++ ecryptfs-utils-23.new/src/libecryptfs/cmd_ln_parser.c       2007-10-03 
11:07:25.000000000 +0200
@@ -217,6 +217,10 @@ int ecryptfs_parse_rc_file(struct ecrypt
 
        uid = getuid();
        pw = getpwuid(uid);
+       if (!pw) {
+               rc = -EIO;
+               goto out;
+       }
        home = pw->pw_dir;
        rc = asprintf(&rcfile_fullpath, "%s/.ecryptfsrc", home);
        if (rc == -1) {
diff -urNp ecryptfs-utils-23/src/utils/mount.ecryptfs.c 
ecryptfs-utils-23.new/src/utils/mount.ecryptfs.c
--- ecryptfs-utils-23/src/utils/mount.ecryptfs.c        2007-08-20 
14:54:16.000000000 +0300
+++ ecryptfs-utils-23.new/src/utils/mount.ecryptfs.c    2007-10-03 
12:52:26.000000000 +0200
@@ -298,6 +298,10 @@ static int process_sig(char *auth_tok_si
 
        id = getuid();
        pw = getpwuid(id);
+       if (!pw) {
+               rc = -EIO;
+               goto out;
+       }
        home = pw->pw_dir;
        rc = asprintf(&dot_ecryptfs_dir, "%s/.ecryptfs", home);
        if (rc == -1) {

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
eCryptfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecryptfs-devel

Reply via email to