SoC: Admin Log Project Status
Gerald (Jerry) Carter
jerry at samba.org
Fri Jun 30 19:36:54 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Michael Krax wrote:
> The first milestone is approaching quickly: here comes a
> small summary of what is working now:
I'm looking over your code and things look good. I'll finish
my testing today.
> void admin_log_typeid(uint32 eventTypeId, uint16 priority,
> NTSTATUS ntstatus_code,
> const char *user, const char *machine,
> const char *format_str, ...);
> writes an entry to syslog, i.e.:
> Jun 27 21:21:22 cat smbpasswd: 0x00080001 \\cat "" (passdb) Created user
> root. NT Status: Success
> (cat being the local hostname)
> BTW. Code is available via (bzr branch)
> http://people.samba.org/bzr/mkrax/samba-soc/. Perhaps I
> should provide some other ressource too, like a diff. Jerry?
If you like. a 'bzr merge http://people.samba.org/bzr/mkrax/samba-soc/'
makes it really easy to get a diff. But posting a patch for
non-bzr folks is probably a good idea.
> admin_log.h provides different macros around admin_log_typeid which
> should be called by the other parts of samba, i.e.
> ADMINLOG_NTSTATUS( ADMIN_LOG_EVENTID_DELETE_USER,
> "Deleted user %s",
> sam_acct->username ); (in pdb_interface.c)
> get_current_username() does not provide what I hoped for, at least if
> called by smbpasswd.
Correct. The reason is that the current_user struct filled in
by smbd when handling CIFS sessions. smbpasswd is acting locally.
> Basically, there are two problems:
> 1) To find the right point to insert the call to ADMINLOG. In some
> cases, there are probably multiple calls necessary.
> 2) To get the right params to pass to ADMINLOG (especially user and
> machine name).
If you get stuck trying to figure out where to get the information
from, just ping me. Or grab me on IRC. I'll get some more
feedback after I finish testing (compile is finishing up now).
Samba ------- http://www.samba.org
Centeris ----------- http://www.centeris.com
"What man is a man who does not make the world better?" --Balian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the samba-technical