summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/01-tss-user.patch25
-rw-r--r--debian/patches/02-manapge.patch67
-rw-r--r--debian/patches/03-readme.patch47
-rw-r--r--debian/patches/05-gcc47.patch58
-rw-r--r--debian/patches/series4
5 files changed, 201 insertions, 0 deletions
diff --git a/debian/patches/01-tss-user.patch b/debian/patches/01-tss-user.patch
new file mode 100644
index 0000000..9b22ec0
--- /dev/null
+++ b/debian/patches/01-tss-user.patch
@@ -0,0 +1,25 @@
+Author: Daniel Baumann <daniel@debian.org>
+Description: Avoiding chown/chmod for tss user at build-time.
+
+--- a/dist/Makefile.am
++++ b/dist/Makefile.am
+@@ -2,15 +2,15 @@
+ fedora/fedora.initrd.tcsd
+ install: install-exec-hook
+ if test ! -e ${DESTDIR}/@sysconfdir@/tcsd.conf; then mkdir -p ${DESTDIR}/@sysconfdir@ && cp tcsd.conf ${DESTDIR}/@sysconfdir@; fi
+- /bin/chown tss:tss ${DESTDIR}/@sysconfdir@/tcsd.conf || true
+- /bin/chmod 0600 ${DESTDIR}/@sysconfdir@/tcsd.conf
++# /bin/chown tss:tss ${DESTDIR}/@sysconfdir@/tcsd.conf || true
++# /bin/chmod 0600 ${DESTDIR}/@sysconfdir@/tcsd.conf
+
+ install-exec-hook:
+ /usr/sbin/groupadd tss || true
+ /usr/sbin/useradd -r tss -g tss || true
+ /bin/sh -c 'if [ ! -e ${DESTDIR}/@localstatedir@/lib/tpm ];then mkdir -p ${DESTDIR}/@localstatedir@/lib/tpm; fi'
+- /bin/chown tss:tss ${DESTDIR}/@localstatedir@/lib/tpm || true
+- /bin/chmod 0700 ${DESTDIR}/@localstatedir@/lib/tpm
++# /bin/chown tss:tss ${DESTDIR}/@localstatedir@/lib/tpm || true
++# /bin/chmod 0700 ${DESTDIR}/@localstatedir@/lib/tpm
+
+ uninstall-hook:
+ /usr/sbin/userdel tss || true
diff --git a/debian/patches/02-manapge.patch b/debian/patches/02-manapge.patch
new file mode 100644
index 0000000..7c6c099
--- /dev/null
+++ b/debian/patches/02-manapge.patch
@@ -0,0 +1,67 @@
+Author: Daniel Baumann <daniel@debian.org>
+Author: Laurent Bigonville <bigon@debian.org>
+Description: Fixing typo in manpage
+
+Index: trousers/man/man3/Tspi_Context_Connect.3
+===================================================================
+--- trousers.orig/man/man3/Tspi_Context_Connect.3 2012-06-18 22:03:51.821545110 +0200
++++ trousers/man/man3/Tspi_Context_Connect.3 2012-06-18 22:04:11.125545177 +0200
+@@ -20,7 +20,7 @@
+ .IP "\\$1" \\$2
+ ..
+ .TH "Tspi_Context_Connect" 3 "2004-05-26" "TSS 1.1" "TCG Software Stack Developer's Reference"
+-.SH NAME.
++.SH NAME
+ Tspi_Context_Connect\- connect a TSP to a Core Services daemon
+ .SH "SYNOPSIS"
+ .ad l
+Index: trousers/man/man8/tcsd.8.in
+===================================================================
+--- trousers.orig/man/man8/tcsd.8.in 2012-06-18 22:03:51.821545110 +0200
++++ trousers/man/man8/tcsd.8.in 2012-06-18 22:04:11.125545177 +0200
+@@ -59,7 +59,7 @@
+ administrator using firewall rules. If using iptables, the following rule
+ will allow a specific host access to the tcsd:
+
+-# iptables -A INPUT -s $IP_ADDRESS -p tcp --destination-port @TCSD_DEFAULT_PORT@ -j ACCEPT
++# iptables \-A INPUT \-s $IP_ADDRESS \-p tcp \-\-destination\-port @TCSD_DEFAULT_PORT@ \-j ACCEPT
+
+ Access to individual commands internal to the tcsd is configured by the
+ \fBtcsd\fR configuration file's "remote_ops" directive. Each function call
+@@ -72,8 +72,8 @@
+
+ .SH "DATA FILES"
+ .PP
+-TSS applications have access to 2 different kinds of 'persistant' storage. 'User'
+-persistant storage has the lifetime of that of the application using it
++TSS applications have access to 2 different kinds of 'persistent' storage. 'User'
++persistent storage has the lifetime of that of the application using it
+ and therefore is destroyed when an application exits. User PS is controlled
+ by the TSP of the application. 'System' persistent storage is controlled by
+ the TCS and stays valid across application lifetimes, \fBtcsd\fR restarts and
+Index: trousers/man/man3/Tspi_Context_GetCapability.3
+===================================================================
+--- trousers.orig/man/man3/Tspi_Context_GetCapability.3 2012-06-18 22:03:51.821545110 +0200
++++ trousers/man/man3/Tspi_Context_GetCapability.3 2012-06-18 22:04:11.125545177 +0200
+@@ -21,7 +21,7 @@
+ ..
+ .TH "Tspi_Context_GetCapability" 3 "2004-05-26" "TSS 1.1" "TCG Software Stack Developer's Reference"
+ .SH NAME
+-Tspi_Context_GetCapability \- provide the capabilites of a TSS Core Service, TSS Service Provider, or TPM.
++Tspi_Context_GetCapability \- provide the capabilities of a TSS Core Service, TSS Service Provider, or TPM.
+ .SH "SYNOPSIS"
+ .ad l
+ .hy 0
+Index: trousers/man/man3/Tspi_TPM_CollateIdentityRequest.3
+===================================================================
+--- trousers.orig/man/man3/Tspi_TPM_CollateIdentityRequest.3 2012-06-18 22:03:51.821545110 +0200
++++ trousers/man/man3/Tspi_TPM_CollateIdentityRequest.3 2012-06-18 22:04:11.125545177 +0200
+@@ -73,7 +73,7 @@
+ Handle to the identity key object
+ .PP
+ .SS algid
+-The type of symmetric algorithm touse as requred by the Enhanced CA.
++The type of symmetric algorithm touse as required by the Enhanced CA.
+ .PP
+ .SS pulTCPAIdentityReqLength
+ Recieves the length (in bytes) of the prgbTCPAIdentityReq parameter
diff --git a/debian/patches/03-readme.patch b/debian/patches/03-readme.patch
new file mode 100644
index 0000000..4d02340
--- /dev/null
+++ b/debian/patches/03-readme.patch
@@ -0,0 +1,47 @@
+Author: Daniel Baumann <daniel@debian.org>
+Description: Adjusting file pathes and locations to debian.
+
+--- a/README
++++ b/README
+@@ -105,9 +105,9 @@
+ storage file for trousers to use. Normally trousers would create this file
+ itself at the time ownership is taken. If your SRK has been given an
+ authorization password by the non-Linux OS, you will need to move the file
+-dist/system.data.auth to /usr/local/var/lib/tpm/system.data. If you've
++examples/system.data.auth to /var/lib/tpm/system.data. If you've
+ taken ownership of your TPM without issuing a password, move
+-dist/system.data.noauth to /usr/local/var/lib/tpm/system.data.
++examples/system.data.noauth to /var/lib/tpm/system.data.
+
+ Passwords: When entering passwords for keys you'd like to use in both
+ Linux and other OS's, you'll need to take note of how you entered those
+@@ -165,10 +165,10 @@
+ valid across all application lifetimes, TCSD restarts and system
+ resets. Data registered in system PS stays valid until an application
+ requests that it be removed. The System PS file by default is
+- /usr/local/var/lib/tpm/system.data. The system PS file is initially
++ /var/lib/tpm/system.data. The system PS file is initially
+ created when ownership of the TPM is first taken.
+
+- D) A config file. By default located in /usr/local/etc/tcsd.conf.
++ D) A config file. By default located in /etc/tcsd.conf.
+
+
+ RUNNING the TSS
+@@ -192,13 +192,13 @@
+ or,
+ # modprobe tpm_natl
+
+- start the TCS Core Services daemon, by default /usr/local/sbin/tcsd.
+- # /usr/local/sbin/tcsd
++ start the TCS Core Services daemon, by default /usr/sbin/tcsd.
++ # /etc/init.d/tcsd start
+
+ If you're attempting to make the TCS Core Services daemon communicate with a
+ softwware TPM through TCP, you must call it using the -e option.
+
+- # /usr/local/sbin/tcsd -e
++ # /usr/sbin/tcsd -e
+
+ The default values for hostname, port and UN socket device path are "localhost",
+ "6545" and "/var/run/tpm/tpmd_socket:0". It will search for the IN socket device,
diff --git a/debian/patches/05-gcc47.patch b/debian/patches/05-gcc47.patch
new file mode 100644
index 0000000..2b4aab2
--- /dev/null
+++ b/debian/patches/05-gcc47.patch
@@ -0,0 +1,58 @@
+Index: trousers/tools/ps_convert.c
+===================================================================
+--- trousers.orig/tools/ps_convert.c 2011-11-21 21:11:53.779074686 +0100
++++ trousers/tools/ps_convert.c 2012-04-05 22:22:14.372753689 +0200
+@@ -110,9 +110,9 @@
+ OUT(out, buf, sizeof(TSS_UUID));
+ OUT(out, &buf[sizeof(TSS_UUID)], sizeof(TSS_UUID));
+
+- pub_data_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID))];
+- blob_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID)) + sizeof(UINT16)];
+- cache_flags = *(UINT16 *)&buf[2*sizeof(TSS_UUID) + 2*sizeof(UINT16)];
++ pub_data_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)));
++ blob_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)) + sizeof(UINT16));
++ cache_flags = *(UINT16 *)(buf + 2*sizeof(TSS_UUID) + 2*sizeof(UINT16));
+
+ OUT(out, &pub_data_size, sizeof(UINT16));
+ OUT(out, &blob_size, sizeof(UINT16));
+Index: trousers/tools/ps_inspect.c
+===================================================================
+--- trousers.orig/tools/ps_inspect.c 2012-04-05 22:18:41.556752931 +0200
++++ trousers/tools/ps_inspect.c 2012-04-05 22:21:13.804753466 +0200
+@@ -114,9 +114,9 @@
+ PRINT("parent uuid%d: ", i);
+ print_hex(&buf[sizeof(TSS_UUID)], sizeof(TSS_UUID));
+
+- pub_data_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID))];
+- blob_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID)) + sizeof(UINT16)];
+- cache_flags = *(UINT16 *)&buf[2*sizeof(TSS_UUID) + 2*sizeof(UINT16)];
++ pub_data_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)));
++ blob_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)) + sizeof(UINT16));
++ cache_flags = *(UINT16 *)(buf + 2*sizeof(TSS_UUID) + 2*sizeof(UINT16));
+
+ PRINT("pub_data_size%d: %hu\n", i, pub_data_size);
+ PRINT("blob_size%d: %hu\n", i, blob_size);
+@@ -151,10 +151,10 @@
+ PRINT("parent uuid%d: ", i);
+ print_hex(&buf[sizeof(TSS_UUID)], sizeof(TSS_UUID));
+
+- pub_data_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID))];
+- blob_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID)) + sizeof(UINT16)];
+- vendor_data_size = *(UINT32 *)&buf[(2 * sizeof(TSS_UUID)) + 2*sizeof(UINT16)];
+- cache_flags = *(UINT16 *)&buf[2*sizeof(TSS_UUID) + sizeof(UINT16) + sizeof(UINT32)];
++ pub_data_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)));
++ blob_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)) + sizeof(UINT16));
++ vendor_data_size = *(UINT32 *)(buf + (2 * sizeof(TSS_UUID)) + 2*sizeof(UINT16));
++ cache_flags = *(UINT16 *)(buf + 2*sizeof(TSS_UUID) + sizeof(UINT16) + sizeof(UINT32));
+
+ PRINT("pub_data_size%d: %hu\n", i, pub_data_size);
+ PRINT("blob_size%d: %hu\n", i, blob_size);
+@@ -229,7 +229,7 @@
+ version_1_print(FILE *f)
+ {
+ int rc, members = 0;
+- UINT32 i, u32 = *(UINT32 *)&buf[1];
++ UINT32 i, u32 = *(UINT32 *)(buf + 1);
+
+ PRINT("version: 1\n");
+ PRINT("number of keys: %u\n", u32);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8e9c2e2
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+01-tss-user.patch
+02-manapge.patch
+03-readme.patch
+05-gcc47.patch