Bug 11418 - net ads create keytab command crashing
Summary: net ads create keytab command crashing
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.2.3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-28 12:56 UTC by Andreas Schneider
Modified: 2016-07-30 01:06 UTC (History)
3 users (show)

See Also:


Attachments
patch for 4.2 (5.29 KB, patch)
2015-07-28 13:04 UTC, Andreas Schneider
ab: review+
Details
patch for 4.1 (7.24 KB, patch)
2015-07-28 13:06 UTC, Andreas Schneider
ab: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2015-07-28 12:56:50 UTC
net ads create keytab command crashing if you do:

$ net ads keytab create -U <username>  


bt:
(gdb) bt
#0  krb5_free_principal (context=<optimized out>, val=0x7f0fcc7359b7 <__add_to_environ+983>) at kfree.c:394
#1  0x00007f0fcda0e069 in krb5_free_keytab_entry_contents (context=<optimized out>, entry=entry@entry=0x7fff4a7fca40) at ktfr_entry.c:37
#2  0x00007f0fd0482365 in smb_krb5_kt_free_entry (context=<optimized out>, kt_entry=kt_entry@entry=0x7fff4a7fca40)
    at ../lib/krb5_wrap/krb5_samba.c:1102
#3  0x00007f0fd2a6c40d in ads_keytab_create_default (ads=<optimized out>) at ../source3/libads/kerberos_keytab.c:747
#4  0x00007f0fd443bbf0 in net_ads_keytab_create (c=0x7f0fd4c97190, argc=<optimized out>, argv=<optimized out>)
    at ../source3/utils/net_ads.c:2528
#5  0x00007f0fd4437c89 in net_ads_keytab (c=0x7f0fd4c97190, argc=1, argv=0x7f0fd4c99918) at ../source3/utils/net_ads.c:2597
#6  0x00007f0fd443e9a4 in net_ads (c=<optimized out>, argc=<optimized out>, argv=<optimized out>) at ../source3/utils/net_ads.c:3350
#7  0x00007f0fd441faea in main (argc=6, argv=0x7fff4a7fda68) at ../source3/utils/net.c:960

Patch will follow
Comment 1 Andreas Schneider 2015-07-28 13:04:10 UTC
Created attachment 11289 [details]
patch for 4.2
Comment 2 Andreas Schneider 2015-07-28 13:06:52 UTC
Created attachment 11290 [details]
patch for 4.1
Comment 3 Andreas Schneider 2015-07-28 14:08:17 UTC
Karolin, please add the patches to the relevant branches. Thanks!
Comment 4 Andrew Bartlett 2016-07-30 01:06:16 UTC
As this wasn't assigned to Karolin at the time, sadly these seem to have been missed, and the fixes including 38beef2ff63664d7d5805f1032bb9f69d0b965d7 were not picked into 4.2 or 4.1 before they closed to non-security fixes.

However as the patches landed in master this is fixed in Samba 4.3.