Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 42127 - kadm5 header not C++ safe
kadm5 header not C++ safe
Product: Red Hat Raw Hide
Classification: Retired
Component: krb5 (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2001-05-24 08:59 EDT by Enrico Scholz
Modified: 2007-04-18 12:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-05-24 08:59:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2001-05-24 08:59:23 EDT
Description of Problem:

kadm5 headers can not be used (without dirty hacks) in C++ programs:

How Reproducible:

$ cat test.c
#include <kadm5/admin.h>

int main()

Steps to Reproduce:
1. gcc -I/usr/kerberos/include -L/usr/kerberos/lib -lkadm5srv test.c  # C
test case
2. g++ -I/usr/kerberos/include -L/usr/kerberos/lib -lkadm5srv test.c  # C++
test case

Actual Results:

1. succeeds
/tmp/ccoJWP5E.o: In function `main':
/tmp/ccoJWP5E.o(.text+0x18): undefined reference to `kadm5_init(char *,
char *, char *, _kadm5_config_params *, unsigned int, unsigned int, void
collect2: ld returned 1 exit status

Expected Results:

2. succeeds also

Additional Information:

$ rpm -q krb5-devel gcc

Bug was reported to the maintainers
(http://diswww.mit.edu:8008/menelaus.mit.edu/krb5-bugs/3213) also.
Comment 1 Nalin Dahyabhai 2001-06-28 09:39:51 EDT
The header file is not actually meant for use outside of the Kerberos source
tree itself.  We install the kadm5 headers to get some way of programmatically
manipulating the Kerberos database, but this practice is not the preferred one,
and we're looking at alternative methods.

I suggest including the header in an extern "C" block, which appears to be
sufficient to compile your sample program with g++ on my test machine.

Note You need to log in before you can comment on or make changes to this bug.