samba_dnsupdate: tmp file cleanup on exception

Andrew Bartlett abartlet at samba.org
Wed Apr 10 17:00:32 MDT 2013


On Tue, 2013-04-09 at 19:06 -0400, Jean Raby wrote:
> Hi,
> 
> here's a small patch that cleans up the temporary file before aborting if 
> creds.get_named_ccache() raises an exception.
> 
> This should not happen, but it is annoying when it does since the script runs 
> every 10 minutes :
> 
>    /usr/sbin/samba_dnsupdate: Traceback (most recent call last):
> [2013/04/09 06:46:25,  0] ../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
>    /usr/sbin/samba_dnsupdate:   File "/usr/sbin/samba_dnsupdate", line 507, in 
> <module>
> [2013/04/09 06:46:25,  0] ../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
>    /usr/sbin/samba_dnsupdate:     get_credentials(lp)
> [2013/04/09 06:46:25,  0] ../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
>    /usr/sbin/samba_dnsupdate:   File "/usr/sbin/samba_dnsupdate", line 121, in 
> get_credentials
> [2013/04/09 06:46:25,  0] ../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
>    /usr/sbin/samba_dnsupdate:     creds.get_named_ccache(lp, ccachename)
> [2013/04/09 06:46:25,  0] ../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
>    /usr/sbin/samba_dnsupdate: RuntimeError: kinit for MACHINE$@DOMAIN.TLD failed 
> (Cannot contact any KDC for requested realm)
> [2013/04/09 06:46:25,  0] ../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
>    /usr/sbin/samba_dnsupdate:
> [2013/04/09 06:46:25,  3] 
> ../source4/dsdb/dns/dns_update.c:296(dnsupdate_nameupdate_done)
>    Completed DNS update check OK

Jean,

Any chance of getting that to me as a git patch?

eg 

git commit
(follow any instructions about resetting name and e-mail address)

git format-patch -1


I know it's a trivial patch, but it's good practice, let's you write the
commit message as I'm sure you will find lots more little fixes, and
I'll be incredibly happy to help get those into Samba as well. 

Andrew Bartlett 

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list