Bug 6943 - eventlogadm uses wrong configuration
eventlogadm uses wrong configuration
Status: RESOLVED FIXED
Product: Samba 3.6
Classification: Unclassified
Component: Client Tools
unspecified
Other Linux
: P3 enhancement
: ---
Assigned To: Guenther Deschner
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-30 12:51 UTC by Jens Nissen
Modified: 2010-02-15 01:33 UTC (History)
1 user (show)

See Also:


Attachments
proposed patch (4.11 KB, patch)
2010-02-13 13:31 UTC, Holger Hetterich
no flags Details
Addition to the proposed patch (864 bytes, patch)
2010-02-13 14:08 UTC, Holger Hetterich
no flags Details
revised patch (4.02 KB, patch)
2010-02-14 12:09 UTC, Holger Hetterich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Nissen 2009-11-30 12:51:55 UTC
When starting eventlogadm with -d, one can see, that eventlogadm uses the wrong configuration file "smb.conf" instead of "my.smb.conf" which is used by the running smbd and winbind. (smb.conf is used by a different smbd!!!)

This causes the write of event logs to some "obscure" other file.

So eventlogadm definitely needs a -s parameter which shows the path to the correct configuration.

eventlogadm ....

Starting write for eventlog [Application]
Active eventlog names (from smb.conf):
--------------------------------------
        <None specified>
Read line [LEN:0]
Read line [RS1:1699505740]
Read line [RCN:0]
Read line [TMG:1259606958]
Read line [TMW:1259606958]
Read line [EID:1000]
Read line [ETP:MeinTest]
Read line [ECT:0]
Read line [RS2:0]
Read line [CRN:0]
Read line [USL:0]
Read line [SRC:ads]
Read line [SRN:nasdrive5]
Read line [STR:MeinTest]
Read line [DAT:]
Read line []
record number [0], tg [1259606958] , tw [1259606958]
Wrote record 11

---------------------------------
Check resulting tdb with tdbdump:
---------------------------------

tdbdump sysloglinux.tdb
{
key(13) = "INFO/maxsize\00"
data(4) = "\00\08\00\00"
}
{
key(18) = "INFO/oldest_entry\00"
data(4) = "\01\00\00\00"
}
{
key(17) = "INFO/next_record\00"
data(4) = "\01\00\00\00"
}
{
key(13) = "INFO/version\00"
data(4) = "\01\00\00\00"
}
{
key(15) = "INFO/retention\00"
data(4) = "\00\09:\80"
}
Comment 1 Guenther Deschner 2009-12-01 15:55:45 UTC
Marking as enhancement, as eventlogadm never promised to handle other config files.
Comment 2 Karolin Seeger 2010-01-25 08:45:45 UTC
Too late for enhancements for 3.5. Raising version.
Comment 3 Holger Hetterich 2010-02-13 13:31:33 UTC
Created attachment 5344 [details]
proposed patch

Günther please check if this patch works for you, and if so
please get it in, thanks! Patch is against master.
Comment 4 Holger Hetterich 2010-02-13 14:08:20 UTC
Created attachment 5345 [details]
Addition to the proposed patch

Removes the misplaced printf. I decided for removing it completely, as eventlogadm will either use the default, use the given file, or report an error.
Comment 5 Volker Lendecke 2010-02-14 04:12:31 UTC
Isn't -s the samba convention for pointing at an alternative smb.conf file? And, can you squash those two patches into one?

Volker
Comment 6 Holger Hetterich 2010-02-14 12:09:44 UTC
Created attachment 5346 [details]
revised patch

Reviewed patch, now using "-s" for the command, with all changes merged. Thanks for the hints Volker!
Comment 7 Volker Lendecke 2010-02-15 01:33:18 UTC
Pushed, thanks!

Volker