summaryrefslogtreecommitdiff
path: root/usr/src/lib/libelfsign
diff options
context:
space:
mode:
authorAli Bahrami <Ali.Bahrami@Sun.COM>2009-06-18 13:16:39 -0600
committerAli Bahrami <Ali.Bahrami@Sun.COM>2009-06-18 13:16:39 -0600
commit62b628a68db596a2d75a316dc7ffef658079231f (patch)
tree6d2f7ab582d82b5c1ab5f0214cc4e92b9cc2e2b7 /usr/src/lib/libelfsign
parent60c682e1f62d3c131ea9130c21e0ccd86044e039 (diff)
downloadillumos-joyent-62b628a68db596a2d75a316dc7ffef658079231f.tar.gz
6851224 elf_getshnum() and elf_getshstrndx() incompatible with 2002 ELF gABI agreement
PSARC/2009/363 replace elf_getphnum, elf_getshnum, and elf_getshstrndx
Diffstat (limited to 'usr/src/lib/libelfsign')
-rw-r--r--usr/src/lib/libelfsign/common/elfsignlib.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr/src/lib/libelfsign/common/elfsignlib.c b/usr/src/lib/libelfsign/common/elfsignlib.c
index d40a8bd0e9..361c83911d 100644
--- a/usr/src/lib/libelfsign/common/elfsignlib.c
+++ b/usr/src/lib/libelfsign/common/elfsignlib.c
@@ -20,12 +20,10 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#define ELF_TARGET_ALL /* get definitions of all section flags */
#include <sys/types.h>
@@ -356,7 +354,7 @@ elfsign_begin(const char *filename, enum ES_ACTION action, ELFsign_t *essp)
* Call elf_getshstrndx to be sure we have a real ELF object
* this is required because elf_begin doesn't check that.
*/
- if (elf_getshstrndx(ess->es_elf, &ess->es_shstrndx) == 0) {
+ if (elf_getshdrstrndx(ess->es_elf, &ess->es_shstrndx) == -1) {
elfsign_end(ess);
cryptodebug("elfsign_begin: elf_getshstrndx failed");
return (ELFSIGN_INVALID_ELFOBJ);