~ubuntu-branches/ubuntu/gutsy/samba/gutsy-updates

« back to all changes in this revision

Viewing changes to source/rpc_server/srv_eventlog_nt.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2006-11-28 20:14:37 UTC
  • mfrom: (0.10.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061128201437-a6x4lzlhempazocp
Tags: 3.0.23d-1ubuntu1
* Merge from debian unstable.
* Drop python2.4-samba, replace with python-samba. Added Conflicts/Replaces
  on python2.4-samba
* Drop track-connection-dos.patch, ubuntu-winbind-panic.patch, 
  ubuntu-fix-ldap.patch, ubuntu-setlocale.patch, ubuntu-setlocale-fixes.patch
* Remaining Ubuntu changes:
  - Revert Debian's installation of mount.cifs and umount.cifs as suid
  - Comment out the default [homes] shares and add more verbose comments to
    explain what they do and how they work (closes: launchpad.net/27608)
  - Add a "valid users = %S" stanza to the commented-out [homes] section, to
    show users how to restrict access to \\server\username to only username.
  - Change the (commented-out) "printer admin" example to use "@lpadmin"
    instead of "@ntadmin", since the lpadmin group is used for spool admin.
  - Alter the panic-action script to encourage users to report their
    bugs in Ubuntu packages to Ubuntu, rather than reporting to Debian.
    Modify text to more closely match the Debian script
  - Munge our init script to deal with the fact that our implementation
    (or lack thereof) of log_daemon_msg and log_progress_msg differs
    from Debian's implementation of the same (Ubuntu #19691)
  - Kept ubuntu-auxsrc.patch: some auxilliary sources (undocumented in 
    previous changelogs)
  - Set default workgroup to MSHOME

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
 
147
147
        /* lock the tdb since we have to get 2 records */
148
148
 
149
 
        tdb_lock_bystring( ELOG_TDB_CTX(info->etdb), EVT_NEXT_RECORD, 1 );
 
149
        tdb_lock_bystring_with_timeout( ELOG_TDB_CTX(info->etdb), EVT_NEXT_RECORD, 1 );
150
150
        next_record = tdb_fetch_int32( ELOG_TDB_CTX(info->etdb), EVT_NEXT_RECORD);
151
151
        oldest_record = tdb_fetch_int32( ELOG_TDB_CTX(info->etdb), EVT_OLDEST_ENTRY);
152
152
        tdb_unlock_bystring( ELOG_TDB_CTX(info->etdb), EVT_NEXT_RECORD);
289
289
        int srecno;
290
290
        int reclen;
291
291
        int len;
292
 
        uint8 *rbuff;
293
292
 
294
293
        pstring *wpsource, *wpcomputer, *wpsid, *wpstrs, *puserdata;
295
294
 
296
295
        key.dsize = sizeof( int32 );
297
 
        rbuff = NULL;
298
296
 
299
297
        srecno = recno;
300
298
        key.dptr = ( char * ) &srecno;
682
680
        int bytes_left, record_number;
683
681
        uint32 elog_read_type, elog_read_dir;
684
682
 
 
683
        if (info == NULL) {
 
684
                return NT_STATUS_INVALID_HANDLE;
 
685
        }
 
686
 
685
687
        info->flags = q_u->flags;
686
688
        ps = &p->out_data.rdata;
687
689
 
768
770
{
769
771
        EVENTLOG_INFO *info = find_eventlog_info_by_hnd( p, &q_u->handle );
770
772
 
 
773
        if (info == NULL) {
 
774
                return NT_STATUS_INVALID_HANDLE;
 
775
        }
 
776
 
771
777
        if ( !( get_oldest_entry_hook( info ) ) )
772
778
                return NT_STATUS_ACCESS_DENIED;
773
779
 
785
791
{
786
792
        EVENTLOG_INFO *info = find_eventlog_info_by_hnd( p, &q_u->handle );
787
793
 
 
794
        if (info == NULL) {
 
795
                return NT_STATUS_INVALID_HANDLE;
 
796
        }
 
797
 
788
798
        if ( !( get_num_records_hook( info ) ) )
789
799
                return NT_STATUS_ACCESS_DENIED;
790
800