~ubuntu-branches/ubuntu/lucid/ecryptfs-utils/lucid-security

« back to all changes in this revision

Viewing changes to src/key_mod/ecryptfs_key_mod_pkcs11_helper.c

  • Committer: Bazaar Package Importer
  • Author(s): Dustin Kirkland, Dustin Kirkland, Tyler Hicks, Michal Hlavinka, anrxc & Dustin Kirkland, Daniel Baumann & Dustin Kirkland, Arfrever Frehtes Taifersar Arahesis, Frédéric Guihéry
  • Date: 2009-05-02 11:44:56 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: james.westby@ubuntu.com-20090502114456-x714at0k2jxgmwae
Tags: 75-0ubuntu1
[ Dustin Kirkland ]
* debian/rules: drop hackery that moves stuff /usr/share/ecryptfs-utils
* src/utils/mount.ecryptfs_private.c: update inline documentation
* debian/changelog, src/libecryptfs/cmd_ln_parser.c,
  src/libecryptfs/key_management.c, src/pam_ecryptfs/pam_ecryptfs.c,
  src/utils/ecryptfs_add_passphrase.c,
  src/utils/ecryptfs_insert_wrapped_passphrase_into_keyring.c,
  src/utils/ecryptfs_rewrap_passphrase.c,
  src/utils/ecryptfs_unwrap_passphrase.c,
  src/utils/ecryptfs_wrap_passphrase.c: silence some useless logging,
  LP: #313330
* include/ecryptfs.h, libecryptfs/key_management.c,
  utils/ecryptfs_insert_wrapped_passphrase_into_keyring.c,
  utils/ecryptfs_unwrap_passphrase.c: if the file to unwrap is
  unspecified, try to use the default ~/.ecryptfs/wrapped-passphrase
  before bailing out, LP: #359997
* src/utils/ecryptfs-setup-private: unix_chkpwd is not always present
  (eg, gentoo), LP: #332341

[ Tyler Hicks ]
* doc/manpage/ecryptfs.7: ecryptfs_encrypted_view option desription
  was wrong LP: #328761

[ Michal Hlavinka ]
* decision_graph.c: fix uninitialized return code
* mount.ecryptfs.c: don't pass verbosity option to kernel

[ anrxc & Dustin Kirkland ]
* doc/Makefile.am, src/desktop/Makefile.am: fix automake installation from
  /usr/share to /usr/share/ecryptfs-utils

[ Daniel Baumann & Dustin Kirkland ]
* debian/rules, debian/control: sync differences between Debian & Ubuntu's
  packaging

[ Arfrever Frehtes Taifersar Arahesis ]
* src/key_mod/ecryptfs_key_mod_gpg.c,
  src/key_mod/ecryptfs_key_mod_pkcs11_helper.c: fix implicit declations

[ Frédéric Guihéry ]
* key_mod/ecryptfs_key_mod_tspi.c, utils/ecryptfs_generate_tpm_key.c:
  the SRK password should be set to 20 bytes of NULL (wellknown
  password), in order for different tools to request key protection
  with the Storage Root Key

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 * 02111-1307, USA.
21
21
 */
22
22
 
 
23
#include "config.h"
23
24
#include <fcntl.h>
24
25
#include <pwd.h>
25
26
#include <stdio.h>
28
29
#include <errno.h>
29
30
#include <stdlib.h>
30
31
#include <unistd.h>
 
32
#include <openssl/err.h>
 
33
#include <openssl/pem.h>
31
34
#include <openssl/x509.h>
32
35
#include <sys/types.h>
33
36
#include <sys/stat.h>
34
37
#include <pkcs11-helper-1.0/pkcs11h-certificate.h>
35
 
#include "config.h"
36
38
#include "../include/ecryptfs.h"
37
39
#include "../include/decision_graph.h"
38
40
 
872
874
                goto out;
873
875
        }
874
876
        if ((rc = asprintf(&sig_mnt_opt, "ecryptfs_sig=%s", sig)) == -1) {
875
 
                rc = MOUNT_ERROR;
 
877
                rc = -ENOMEM;
876
878
                goto out;
877
879
        }
878
880
        rc = 0;
975
977
        subgraph_provider_ctx = (struct pkcs11h_subgraph_provider_ctx *)(*foo);
976
978
        if ((rc = asprintf(&subgraph_provider_ctx->name, "%s", node->val))
977
979
            == -1) {
978
 
                rc = MOUNT_ERROR;
 
980
                rc = -ENOMEM;
979
981
                goto out;
980
982
        }
981
983
        rc = DEFAULT_TOK;
993
995
        subgraph_provider_ctx = (struct pkcs11h_subgraph_provider_ctx *)(*foo);
994
996
        if ((rc = asprintf(&subgraph_provider_ctx->library, "%s", node->val))
995
997
            == -1) {
996
 
                rc = MOUNT_ERROR;
 
998
                rc = -ENOMEM;
997
999
                goto out;
998
1000
        }
999
1001
        rc = DEFAULT_TOK;
1085
1087
        subgraph_key_ctx = (struct pkcs11h_subgraph_key_ctx *)(*foo);
1086
1088
        if ((rc = asprintf(&subgraph_key_ctx->pkcs11h_data.serialized_id, "%s", node->val))
1087
1089
            == -1) {
1088
 
                rc = MOUNT_ERROR;
 
1090
                rc = -ENOMEM;
1089
1091
                goto out;
1090
1092
        }
1091
1093
        rc = DEFAULT_TOK;
1103
1105
        subgraph_key_ctx = (struct pkcs11h_subgraph_key_ctx *)(*foo);
1104
1106
        if ((rc = asprintf(&subgraph_key_ctx->pkcs11h_data.passphrase, "%s",
1105
1107
                           node->val)) == -1) {
1106
 
                rc = MOUNT_ERROR;
 
1108
                rc = -ENOMEM;
1107
1109
                goto out;
1108
1110
        }
1109
1111
        node->val = NULL;