Bug 96558 - Port to HEIMDAL
Summary: Port to HEIMDAL
Status: RESOLVED MOVED
Alias: None
Product: realmd
Classification: Unclassified
Component: adcli (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Stef Walter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-16 15:26 UTC by Mikhail T.
Modified: 2018-10-12 21:19 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Port outside of Linux -- and allow both MIT and Heimdal kerberos implementations to work (15.75 KB, patch)
2016-06-16 15:26 UTC, Mikhail T.
Details | Splinter Review
General improvements -- Heimdal or not (2.30 KB, patch)
2016-06-16 18:14 UTC, Mikhail T.
Details | Splinter Review
Changes required for building with Heimdal (13.62 KB, patch)
2016-06-16 18:16 UTC, Mikhail T.
Details | Splinter Review

Description Mikhail T. 2016-06-16 15:26:52 UTC
Created attachment 124563 [details] [review]
Port outside of Linux -- and allow both MIT and Heimdal kerberos implementations to work

Attached are patches I had to implement to port adcli to FreeBSD. A few hunks deal with general porting (some headers must be explicitly #include-ed on BSD, which are implicitly loaded on Linux), but the vast majority is for Heimdal compatibility.

Tested on FreeBSD-10.3 using both MIT Kerberos libraries and Heimdal GSSAPI, that comes with the OS. `make check' passes too, but I do not know, how comprehensive that is:

adcli-0.8.1 % make check
Making check in build
Making check in library
make  test-seq test-util  test-ldap test-attrs 
`test-seq' is up to date.
`test-util' is up to date.
`test-ldap' is up to date.
`test-attrs' is up to date.
make  check-TESTS
PASS: test-seq
PASS: test-util
PASS: test-ldap
PASS: test-attrs
============================================================================
Testsuite summary for adcli 0.8.1
============================================================================
# TOTAL: 4
# PASS:  4
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
Making check in tools
Making check in doc
mkdir -p ./html && cp ./static/* ./html/
true html -m ./gtk-doc.xsl -o ./html  --searchpath .:. ./adcli-docs.xml

The very first hunk patches configure, which is included in the source tarball (0.8.1). You'll probably patch configure.ac instead.

The rest should be applicable straight. I had to disable the use/creation of custom krb5.conf in Heimdal case -- the Heimdal does not support includedir and include directives. Fortunately, it seems like it is not necessary anyway...

Detecting Heimdal (and adding -DHEIMDAL to CFLAGS) would be nice too, but I'm not well-versed with configure/libtool et. al.

I'd also like to request, that the prebuilt manual-page (adcli.8) be bundled with the release and installed regardless of --disable-doc. (man-pages are special.) Building it from the XML-source requires xsltproc, which may be too heavy a dependency for some. A minor point...
Comment 1 Mikhail T. 2016-06-16 15:37:40 UTC
FYI, here is the new FreeBSD port

http://www.freshports.org/net-mgmt/adcli/
Comment 2 Stef Walter 2016-06-16 17:00:52 UTC
I'd like to request splitting this into two patches. The parts without the #ifdefs, and the rest. The first part can go in right away. 

And the rest we can then look over more closely, as it's a much higher risk patch for the project.
Comment 3 Mikhail T. 2016-06-16 17:56:00 UTC
(In reply to Stef Walter from comment #2)
> I'd like to request splitting this into two patches. The parts without the
> #ifdefs, and the rest. The first part can go in right away. 

The request makes perfect sense and I tried to keep changes separated on that basis from the beginning. But it is difficult -- not only are changes of both classes affecting the same files, sometimes the hunks within a file may overlap...

I'll try, but it may still not be perfect.
Comment 4 Mikhail T. 2016-06-16 18:14:27 UTC
Created attachment 124564 [details] [review]
General improvements -- Heimdal or not

Ok, these seem to be general improvements. Build with just this hunk succeeds and "make test" passes, when using MIT Kerberos.

The introduction of salt-type enum is not included, because it is interleaved with Heimdal-specific changes (krb5_salt).
Comment 5 Mikhail T. 2016-06-16 18:16:43 UTC
Created attachment 124565 [details] [review]
Changes required for building with Heimdal

Together with the "General improvements" patch, these changes allow builds on FreeBSD (against Heimdal).
Comment 6 GitLab Migration User 2018-10-12 21:19:13 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/realmd/adcli/issues/11.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.