Bug 218000 - sysutils/msktutil: compilation fails if security/krb5 is selected
Summary: sysutils/msktutil: compilation fails if security/krb5 is selected
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-22 11:54 UTC by Michael Osipov
Modified: 2018-01-17 18:53 UTC (History)
3 users (show)

See Also:


Attachments
Patch for GSS-API flavor (757 bytes, patch)
2017-03-22 11:54 UTC, Michael Osipov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2017-03-22 11:54:03 UTC
Created attachment 181050 [details]
Patch for GSS-API flavor

Do "make config" and select MIT Kerberos from ports, run "make":

> DEPRECATED  -Wall -Wextra -Wno-write-strings -c msktutil.cpp -o msktutil.o
> In file included from In file included from krb5wrap.cppmsktkrb5.cppIn file included from msktldap.cpp:In file included from 32:msktutil.cpp31::32:
> :
> 32In file included from :
> In file included from :
> In file included from ./msktutil.h./msktutil.hIn file included from :./msktutil.h:341341./msktutil.h:
> ::
> 341:./krb5wrap.h:./krb5wrap.h341198::
> :19850:./krb5wrap.h:50: 198::
>  :./krb5wrap.h50:: error: errorerror: : no nomember  membernamed no  namedmember'keyblock' 198 'keyblock':in50  :in 'krb5_keytab_entry_st'named   'krb5_keytab_entry_st'
> 
> error: no member named 'keyblock' in 'krb5_keytab_entry_st'
>         return static_cast<krb5_enctype>(m_entry.keyblock.keytype);'keyblock'
>          return static_cast<krb5_enctype>(m_entry.keyblock.keytype);in
>                                          ~~~~~~~ ^ 'krb5_keytab_entry_st'
>         return static_cast<krb5_enctype>(m_entry.keyblock.keytype);
> 
>                                          ~~~~~~~ ^
>         return static_cast<krb5_enctype>(m_entry.keyblock.keytype);
>                                          ~~~~~~~ ^
>                                          ~~~~~~~ ^
> krb5wrap.cpp:38:20: error: no member named 'keyblock' in 'krb5_keytab_entry_st'
>         if (entry->keyblock.keyvalue.data) {
>             ~~~~~  ^
> krb5wrap.cpp:39:27: error: no member named 'keyblock' in 'krb5_keytab_entry_st'
>             memset(entry->keyblock.keyvalue.data, 0, entry->keyblock.keyvalue.length);
>                    ~~~~~  ^
> krb5wrap.cpp:40:25: error: no member named 'keyblock' in 'krb5_keytab_entry_st'
>             free(entry->keyblock.keyvalue.data);
>                  ~~~~~  ^
> krb5wrap.cpp:81:5: error: unknown type namemsktutil.cpp:162:9: error: use of undeclared identifier 'krb5_xfree'
>         krb5_xfree(temp_realm);
>         ^
>  'krb5_salt'
>     krb5_salt salt_data;
>     ^
> msktkrb5.cpp:61:15: error: use of undeclared identifier 'krb5_kt_default_modify_name'; did you mean
>       'krb5_kt_default_name'?
>         ret = krb5_kt_default_modify_name(g_context.get(), keytab_name, MAX_KEYTAB_NAME_LEN);
>               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>               krb5_kt_default_name
> /usr/local/include/krb5/krb5.h:4274:1: note: 'krb5_kt_default_name' declared here
> krb5_kt_default_name(krb5_context context, char *name, int name_size);
> ^
> krb5wrap.cpp:83:26: error: use of undeclared identifier 'KRB5_PW_SALT'
>     salt_data.salttype = KRB5_PW_SALT;
>                          ^
> krb5wrap.cpp:163:5: error: use of undeclared identifier 'krb5_xfree'
>     krb5_xfree(principal_string);
>     ^
> krb5wrap.cpp:179:11: error: no member named 'keyblock' in 'krb5_keytab_entry_st'
>     entry.keyblock = keyblock.get();
>     ~~~~~ ^
> krb5wrap.cpp:197:11: error: no member named 'keyblock' in 'krb5_keytab_entry_st'
>     entry.keyblock.keytype = enctype;
>     ~~~~~ ^
> 9 errors generated.
> gmake[2]: *** [Makefile:34: krb5wrap.o] Error 1
> gmake[2]: *** Waiting for unfinished jobs....
> 2 errors generated.
> gmake[2]: *** [Makefile:34: msktutil.o] Error 1
> 2 errors generated.
> gmake[2]: *** [Makefile:34: msktkrb5.o] Error 1
> 1 error generated.
> gmake[2]: *** [Makefile:34: msktldap.o] Error 1
> gmake[2]: Leaving directory '/usr/ports/sysutils/msktutil/work/msktutil-1.0'
> ===> Compilation failed unexpectedly.
> Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
> the maintainer.
> *** Error code 1
> 
> Stop.
> make[1]: stopped in /usr/ports/sysutils/msktutil
> *** Error code 1
> 
> Stop.
> make: stopped in /usr/ports/sysutils/msktutil

This is due to https://sourceforge.net/p/msktutil/tickets/59/ which has been resolved in 1.0, but requires some configure args.

Patch attached to help configure to find the right GSS-API flavor.
Comment 1 Michael Osipov 2017-03-22 11:59:54 UTC
All done on:

FreeBSD blnn719x.ww004.siemens.net 10.3-STABLE FreeBSD 10.3-STABLE #2 r315312: Wed Mar 15 19:59:58 CET 2017     root@blnn719x.ww004.siemens.net:/usr/obj/usr/src/sys/BLNN719X  i386
Comment 2 Michael Osipov 2018-01-17 17:01:36 UTC
FWIW: I am now one of the maintainers of msktuil for several months now and did extensive testening on FreeBSD. I'd like to finalize a release and take over the port. See: https://github.com/orgs/msktutil/people
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-01-17 18:53:08 UTC
A commit references this bug:

Author: zi
Date: Wed Jan 17 18:52:58 UTC 2018
New revision: 459280
URL: https://svnweb.freebsd.org/changeset/ports/459280

Log:
  - Improve Kerberos support
  - Bump PORTREVISION

  PR:		218000
  Submitted by:	Michael Osipov

Changes:
  head/sysutils/msktutil/Makefile