From cc991ff936e519c21f6d82dc9030caf1340416e4 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Thu, 17 Jun 2010 21:29:51 +0200 Subject: Several fixes related to checks with copy_from/to_user. --- examples/new.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/new.c b/examples/new.c index 72f1517..3cfc206 100644 --- a/examples/new.c +++ b/examples/new.c @@ -673,10 +673,6 @@ test_ncr_store_wrap_key(int cfd) } /* now export the unwrapped */ - /* this cannot be performed like that, because unwrap - * always sets keys as unexportable. Maybe we can implement - * a data comparison ioctl(). - */ memset(&keydata, 0, sizeof(keydata)); keydata.key = key2; keydata.data = dd; @@ -687,6 +683,7 @@ test_ncr_store_wrap_key(int cfd) return 1; } + kdata.data = data; if (ioctl(cfd, NCRIO_DATA_GET, &kdata)) { fprintf(stderr, "Error: %s:%d\n", __func__, __LINE__); perror("ioctl(NCRIO_DATA_GET)"); -- cgit