[krbdev.mit.edu #9195] Porting issues on Solaris
"Martin Řehák via RT" <[email protected]> Tue, 10 Feb 2026 11:33:29 -0500
| Newsgroups | gmane.comp.encryption.kerberos.bugs |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format... ------------=_1770741209-1033561-0 Content-Type: text/plain; charset="utf-8" Tue Feb 10 11:33:29 2026: Request 9195 was acted upon. Transaction: Ticket created by [email protected] Queue: krb5 Subject: Porting issues on Solaris Owner: Nobody Requestors: [email protected] Status: new Ticket <URL: https://krbdev.mit.edu/rt/Ticket/Display.html?id=9195 > Hello, during build of krb5-1.22.2 I have hit following issues: 1. /bin/sh: syntax error at line 1: `&&' unexpected make[3]: *** [Makefile:933: libkrb5support.so.0.1] Error 3 make[3]: Leaving directory '/builds/mrehak/krb5/components/krb5/build/i86/util/support' 2. /opt/developerstudio12.6/bin/cc -KPIC -DSHARED -DHAVE_CONFIG_H -DLIBDIR=\"/usr/lib\" -DBINDIR=\"/usr/bin/i86\" -DSBINDIR=\"/usr/sbin/i86\" -I../../../include -I/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/include -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -m32 -I/usr/include/openldap -m32 -KPIC -DPIC -xO4 -xchip=pentium -xregs=no%frameptr -mt -xcheck=no%stkovf -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -KPIC -DPIC -errtags=yes -errwarn=%all -errwarn=no%E_STATEMENT_NOT_REACHED -errwarn=no%E_NO_IMPLICIT_DECL_ALLOWED -errwarn=no%E_EMPTY_TRANSLATION_UNIT -errwarn=no%E_EMPTY_INITIALIZER -errwarn=no%E_EMPTY_DECLARATION -errwarn=no%E_ENUM_VAL_OVERFLOWS_INT_MAX -errwarn=no%E_DEPRECATED_ATT -errwarn=no%E_INIT_SIGN_EXTEND -Werror=unknown-warning-option -D_POSIX_PTHREAD_SEMANTICS -mt -c /builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/lib/krb5/os/init_os_ctx.c -o init_os_ctx.so.o && mv -f init_os_ctx.so.o init_os_ctx.so "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/lib/krb5/os/addr.c", line 65: syntax error before or at: 1 "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/lib/krb5/os/addr.c", line 67: left operand of "->" must be pointer to struct/union "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/lib/krb5/os/addr.c", line 68: left operand of "->" must be pointer to struct/union cc: acomp failed for /builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/lib/krb5/os/addr.c make[4]: *** [Makefile:898: addr.so] Error 2 make[4]: *** Waiting for unfinished jobs.... "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/lib/krb5/os/hostrealm.c", line 251: warning: statement not reached (E_STATEMENT_NOT_REACHED) make[4]: Leaving directory '/builds/mrehak/krb5/components/krb5/build/i86/lib/krb5/os' 3. /opt/developerstudio12.6/bin/cc -KPIC -DSHARED -DHAVE_CONFIG_H -I../../../include -I/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/include -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -m32 -I/usr/include/openldap -m32 -KPIC -DPIC -xO4 -xchip=pentium -xregs=no%frameptr -mt -xcheck=no%stkovf -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -KPIC -DPIC -errtags=yes -errwarn=%all -errwarn=no%E_STATEMENT_NOT_REACHED -errwarn=no%E_NO_IMPLICIT_DECL_ALLOWED -errwarn=no%E_EMPTY_TRANSLATION_UNIT -errwarn=no%E_EMPTY_INITIALIZER -errwarn=no%E_EMPTY_DECLARATION -errwarn=no%E_ENUM_VAL_OVERFLOWS_INT_MAX -errwarn=no%E_DEPRECATED_ATT -errwarn=no%E_INIT_SIGN_EXTEND -Werror=unknown-warning-option -D_POSIX_PTHREAD_SEMANTICS -mt -c /builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c -o pkinit_crypto_openssl.so.o && mv -f pkinit_crypto_openssl.so.o pkinit_crypto_openssl.so rm -f ../pkinit.so (cd .. && ln -s `basename plugins/preauth/pkinit`/pkinit.so .) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 62: initializer does not fit or is out of range: 134 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 67: initializer does not fit or is out of range: 134 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 72: initializer does not fit or is out of range: 134 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 83: initializer does not fit or is out of range: 134 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 83: initializer does not fit or is out of range: 134 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 83: initializer does not fit or is out of range: 247 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 88: initializer does not fit or is out of range: 134 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 88: initializer does not fit or is out of range: 134 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 88: initializer does not fit or is out of range: 247 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 94: initializer does not fit or is out of range: 134 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 94: initializer does not fit or is out of range: 206 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 100: initializer does not fit or is out of range: 134 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 100: initializer does not fit or is out of range: 206 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 106: initializer does not fit or is out of range: 134 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 106: initializer does not fit or is out of range: 206 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 112: initializer does not fit or is out of range: 134 (E_INIT_DOES_NOT_FIT) "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c", line 112: initializer does not fit or is out of range: 206 (E_INIT_DOES_NOT_FIT) cc: acomp failed for /builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_constants.c make[2]: *** [Makefile:826: pkinit_constants.so] Error 2 make[2]: *** Waiting for unfinished jobs.... "/builds/mrehak/krb5/components/krb5/krb5-1.22.2/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c", line 1071: warning: initializer will be sign-extended: -1 (E_INIT_SIGN_EXTEND) make[2]: Leaving directory '/builds/mrehak/krb5/components/krb5/build/i86/plugins/preauth/pkinit' Attaching a patch to resolve the issues. Please consider integration to main. Thank you, m. ------------=_1770741209-1033561-0 Content-Type: text/x-patch; charset="utf-8"; name="porting.patch" Content-Disposition: attachment; filename="porting.patch" Content-Transfer-Encoding: 7bit RT-Attachment: 9195/104147/26062 The shell script will contain 'done; &&' which is an invalid syntax. --- a/src/config/shlib.conf +++ b/src/config/shlib.conf @@ -243,7 +243,7 @@ *-*-solaris2.[1-7] | *-*-solaris2.[1-7]. # Did Solaris 7 and earlier have a linker option for this? ;; *) - INIT_FINI_PREP='initfini=; for f in . $(LIBINITFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-z,initarray=$${f}__auxinit"; fi; done;' + INIT_FINI_PREP='initfini=; for f in . $(LIBINITFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-z,initarray=$${f}__auxinit"; fi; done' use_linker_init_option=yes ;; esac `sun' variable is reserved on Oracle Developer Studio C compiler and is always 1. --- a/src/lib/apputils/net-server.c +++ b/src/lib/apputils/net-server.c @@ -1086,7 +1086,7 @@ krb5_error_code ret = 0; size_t i; int err, bound_any; struct bind_address addr; - struct sockaddr_un sun; + struct sockaddr_un s_un; struct addrinfo hints, *ai_list = NULL, *ai = NULL; struct sockact_list sockacts = { 0 }; verto_callback vcb; @@ -1115,16 +1115,16 @@ addr = bind_addresses.data[i]; hints.ai_socktype = bind_socktypes[addr.type]; if (addr.type == UNX) { - sun.sun_family = AF_UNIX; - if (strlcpy(sun.sun_path, addr.address, sizeof(sun.sun_path)) >= - sizeof(sun.sun_path)) { + s_un.sun_family = AF_UNIX; + if (strlcpy(s_un.sun_path, addr.address, sizeof(s_un.sun_path)) >= + sizeof(s_un.sun_path)) { ret = ENAMETOOLONG; krb5_klog_syslog(LOG_ERR, _("UNIX domain socket path too long: %s"), addr.address); goto cleanup; } - ret = setup_socket(&addr, (struct sockaddr *)&sun, &sockacts, + ret = setup_socket(&addr, (struct sockaddr *)&s_un, &sockacts, handle, prog, ctx, listen_backlog, verto_callbacks[addr.type], bind_conn_types[addr.type]); --- a/src/lib/krb5/os/addr.c +++ b/src/lib/krb5/os/addr.c @@ -62,10 +62,10 @@ out->contents = (uint8_t *)&sin6->sin6_a } #ifndef _WIN32 } else if (sa->sa_family == AF_UNIX && local_use) { - const struct sockaddr_un *sun = sa2sun(sa); + const struct sockaddr_un *s_un = sa2sun(sa); out->addrtype = ADDRTYPE_UNIXSOCK; - out->length = strlen(sun->sun_path); - out->contents = (uint8_t *)sun->sun_path; + out->length = strlen(s_un->sun_path); + out->contents = (uint8_t *)s_un->sun_path; #endif } else { return KRB5_PROG_ATYPE_NOSUPP; --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -297,16 +297,16 @@ Tprintf("entry %d is '%s'\n", i, hostspe #ifndef _WIN32 if (hostspec[0] == '/') { - struct sockaddr_un sun = { 0 }; + struct sockaddr_un s_un = { 0 }; - sun.sun_family = AF_UNIX; - if (strlcpy(sun.sun_path, hostspec, sizeof(sun.sun_path)) >= - sizeof(sun.sun_path)) { + s_un.sun_family = AF_UNIX; + if (strlcpy(s_un.sun_path, hostspec, sizeof(s_un.sun_path)) >= + sizeof(s_un.sun_path)) { code = ENAMETOOLONG; goto cleanup; } - code = add_addr_to_list(serverlist, UNIXSOCK, AF_UNIX, sizeof(sun), - (struct sockaddr *)&sun); + code = add_addr_to_list(serverlist, UNIXSOCK, AF_UNIX, sizeof(s_un), + (struct sockaddr *)&s_un); if (code) goto cleanup; continue; `char' is not specified to be signed or unsigned in standard. Krb5 code expects to be unsigned. Developer studio consider that an error. --- a/src/plugins/preauth/pkinit/pkinit_constants.c +++ b/src/plugins/preauth/pkinit/pkinit_constants.c @@ -34,17 +34,17 @@ #include "pkinit.h" /* RFC 8636 id-pkinit-kdf-ah-sha1: iso(1) identified-organization(3) dod(6) * internet(1) security(5) kerberosv5(2) pkinit(3) kdf(6) sha1(1) */ -static char kdf_sha1[8] = { 0x2B, 0x06, 0x01, 0x05, 0x02, 0x03, 0x06, 0x01 }; +static unsigned char kdf_sha1[8] = { 0x2B, 0x06, 0x01, 0x05, 0x02, 0x03, 0x06, 0x01 }; /* RFC 8636 id-pkinit-kdf-ah-sha256: iso(1) identified-organization(3) dod(6) * internet(1) security(5) kerberosv5(2) pkinit(3) kdf(6) sha256(2) */ -static char kdf_sha256[8] = { 0x2B, 0x06, 0x01, 0x05, 0x02, 0x03, 0x06, 0x02 }; +static unsigned char kdf_sha256[8] = { 0x2B, 0x06, 0x01, 0x05, 0x02, 0x03, 0x06, 0x02 }; /* RFC 8636 id-pkinit-kdf-ah-sha512: iso(1) identified-organization(3) dod(6) * internet(1) security(5) kerberosv5(2) pkinit(3) kdf(6) sha512(3) */ -static char kdf_sha512[8] = { 0x2B, 0x06, 0x01, 0x05, 0x02, 0x03, 0x06, 0x03 }; +static unsigned char kdf_sha512[8] = { 0x2B, 0x06, 0x01, 0x05, 0x02, 0x03, 0x06, 0x03 }; -const krb5_data kdf_sha1_id = { KV5M_DATA, sizeof(kdf_sha1), kdf_sha1 }; -const krb5_data kdf_sha256_id = { KV5M_DATA, sizeof(kdf_sha256), kdf_sha256 }; -const krb5_data kdf_sha512_id = { KV5M_DATA, sizeof(kdf_sha512), kdf_sha512 }; +const krb5_data kdf_sha1_id = { KV5M_DATA, sizeof(kdf_sha1), (char *)kdf_sha1 }; +const krb5_data kdf_sha256_id = { KV5M_DATA, sizeof(kdf_sha256), (char *)kdf_sha256 }; +const krb5_data kdf_sha512_id = { KV5M_DATA, sizeof(kdf_sha512), (char *)kdf_sha512 }; krb5_data const * const supported_kdf_alg_ids[] = { &kdf_sha256_id, @@ -55,80 +55,80 @@ }; /* RFC 3370 sha-1: iso(1) identified-organization(3) oiw(14) secsig(3) * algorithm(2) 26 */ -static char cms_sha1[] = { 0x2b, 0x0e, 0x03, 0x02, 0x1a }; +static unsigned char cms_sha1[] = { 0x2b, 0x0e, 0x03, 0x02, 0x1a }; /* RFC 5754 id-sha256: joint-iso-itu-t(2) country(16) us(840) organization(1) * gov(101) csor(3) nistalgorithm(4) hashalgs(2) 1 */ -static char cms_sha256[] = { +static unsigned char cms_sha256[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01 }; /* RFC 5754 id-sha384: joint-iso-itu-t(2) country(16) us(840) organization(1) * gov(101) csor(3) nistalgorithm(4) hashalgs(2) 2 */ -static char cms_sha384[] = { +static unsigned char cms_sha384[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02 }; /* RFC 5754 id-sha512: joint-iso-itu-t(2) country(16) us(840) organization(1) * gov(101) csor(3) nistalgorithm(4) hashalgs(2) 3 */ -static char cms_sha512[] = { +static unsigned char cms_sha512[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03 }; -const krb5_data cms_sha1_id = { KV5M_DATA, sizeof(cms_sha1), cms_sha1 }; -const krb5_data cms_sha256_id = { KV5M_DATA, sizeof(cms_sha256), cms_sha256 }; -const krb5_data cms_sha384_id = { KV5M_DATA, sizeof(cms_sha384), cms_sha384 }; -const krb5_data cms_sha512_id = { KV5M_DATA, sizeof(cms_sha512), cms_sha512 }; +const krb5_data cms_sha1_id = { KV5M_DATA, sizeof(cms_sha1), (char *)cms_sha1 }; +const krb5_data cms_sha256_id = { KV5M_DATA, sizeof(cms_sha256), (char *)cms_sha256 }; +const krb5_data cms_sha384_id = { KV5M_DATA, sizeof(cms_sha384), (char *)cms_sha384 }; +const krb5_data cms_sha512_id = { KV5M_DATA, sizeof(cms_sha512), (char *)cms_sha512 }; /* RFC 4055 sha256WithRSAEncryption: iso(1) member-body(2) us(840) * rsadsi(113549) pkcs(1) 1 11 */ -static char sha256WithRSAEncr_oid[9] = { +static unsigned char sha256WithRSAEncr_oid[9] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b }; /* RFC 4055 sha256WithRSAEncryption: iso(1) member-body(2) us(840) * rsadsi(113549) pkcs(1) 1 13 */ -static char sha512WithRSAEncr_oid[9] = { +static unsigned char sha512WithRSAEncr_oid[9] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0d }; /* RFC 3279 ecdsa-with-SHA1: iso(1) member-body(2) us(840) ansi-X9-62(10045) * signatures(4) 1 */ -static char ecdsaWithSha1_oid[] = { +static unsigned char ecdsaWithSha1_oid[] = { 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x01 }; /* RFC 5758 ecdsa-with-SHA256: iso(1) member-body(2) us(840) ansi-X9-62(10045) * signatures(4) ecdsa-with-SHA2(3) 2 */ -static char ecdsaWithSha256_oid[] = { +static unsigned char ecdsaWithSha256_oid[] = { 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02 }; /* RFC 5758 ecdsa-with-SHA384: iso(1) member-body(2) us(840) ansi-X9-62(10045) * signatures(4) ecdsa-with-SHA2(3) 3 */ -static char ecdsaWithSha384_oid[] = { +static unsigned char ecdsaWithSha384_oid[] = { 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x03 }; /* RFC 5758 ecdsa-with-SHA512: iso(1) member-body(2) us(840) ansi-X9-62(10045) * signatures(4) ecdsa-with-SHA2(3) 4 */ -static char ecdsaWithSha512_oid[] = { +static unsigned char ecdsaWithSha512_oid[] = { 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x04 }; const krb5_data sha256WithRSAEncr_id = { - KV5M_DATA, sizeof(sha256WithRSAEncr_oid), sha256WithRSAEncr_oid + KV5M_DATA, sizeof(sha256WithRSAEncr_oid), (char *)sha256WithRSAEncr_oid }; const krb5_data sha512WithRSAEncr_id = { - KV5M_DATA, sizeof(sha512WithRSAEncr_oid), sha512WithRSAEncr_oid + KV5M_DATA, sizeof(sha512WithRSAEncr_oid), (char *)sha512WithRSAEncr_oid }; const krb5_data ecdsaWithSha1_id = { - KV5M_DATA, sizeof(ecdsaWithSha1_oid), ecdsaWithSha1_oid + KV5M_DATA, sizeof(ecdsaWithSha1_oid), (char *)ecdsaWithSha1_oid }; const krb5_data ecdsaWithSha256_id = { - KV5M_DATA, sizeof(ecdsaWithSha256_oid), ecdsaWithSha256_oid + KV5M_DATA, sizeof(ecdsaWithSha256_oid), (char *)ecdsaWithSha256_oid }; const krb5_data ecdsaWithSha384_id = { - KV5M_DATA, sizeof(ecdsaWithSha384_oid), ecdsaWithSha384_oid + KV5M_DATA, sizeof(ecdsaWithSha384_oid), (char *)ecdsaWithSha384_oid }; const krb5_data ecdsaWithSha512_id = { - KV5M_DATA, sizeof(ecdsaWithSha512_oid), ecdsaWithSha512_oid + KV5M_DATA, sizeof(ecdsaWithSha512_oid), (char *)ecdsaWithSha512_oid }; krb5_data const * const supported_cms_algs[] = { ------------=_1770741209-1033561-0 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ krb5-bugs mailing list [email protected] https://mailman.mit.edu/mailman/listinfo/krb5-bugs ------------=_1770741209-1033561-0--