Changeset 740 for vendor/current/source3/lib/eventlog
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (13 years ago)
- Location:
- vendor/current/source3/lib/eventlog
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/lib/eventlog/eventlog.c
r414 r740 22 22 23 23 #include "includes.h" 24 #include "system/filesys.h" 25 #include "lib/eventlog/eventlog.h" 26 #include "../libcli/security/security.h" 27 #include "util_tdb.h" 24 28 25 29 /* maintain a list of open eventlog tdbs with reference counts */ … … 66 70 char *elog_tdbname(TALLOC_CTX *ctx, const char *name ) 67 71 { 68 char *path = talloc_asprintf(ctx, "%s/%s.tdb", 69 state_path("eventlog"), 70 name); 72 char *path; 73 char *file; 74 char *tdbname; 75 76 path = talloc_strdup(ctx, state_path("eventlog")); 71 77 if (!path) { 72 78 return NULL; 73 79 } 74 strlower_m(path); 75 return path; 80 81 file = talloc_asprintf_strlower_m(path, "%s.tdb", name); 82 if (!file) { 83 talloc_free(path); 84 return NULL; 85 } 86 87 tdbname = talloc_asprintf(path, "%s/%s", state_path("eventlog"), file); 88 if (!tdbname) { 89 talloc_free(path); 90 return NULL; 91 } 92 93 return tdbname; 76 94 } 77 95 … … 677 695 blob = data_blob_const(data.dptr, data.dsize); 678 696 679 ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, NULL,r,697 ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, r, 680 698 (ndr_pull_flags_fn_t)ndr_pull_eventlog_Record_tdb); 681 699 … … 727 745 } 728 746 729 r->Length = r->Length2 = ndr_size_EVENTLOGRECORD(r, NULL,0);747 r->Length = r->Length2 = ndr_size_EVENTLOGRECORD(r, 0); 730 748 731 749 return r; … … 771 789 r->record_number = tdb_fetch_int32(tdb, EVT_NEXT_RECORD); 772 790 773 ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL,r,791 ndr_err = ndr_push_struct_blob(&blob, mem_ctx, r, 774 792 (ndr_push_flags_fn_t)ndr_push_eventlog_Record_tdb); 775 793 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { … … 941 959 } 942 960 if (len > 0) { 943 e->UserSid = *string_sid_talloc(mem_ctx, sid_str);961 string_to_sid(&e->UserSid, sid_str); 944 962 } 945 963 } … … 993 1011 } 994 1012 995 endoffset += ndr_size_EVENTLOGRECORD(&e, NULL,0);1013 endoffset += ndr_size_EVENTLOGRECORD(&e, 0); 996 1014 997 1015 ADD_TO_ARRAY(mem_ctx, struct EVENTLOGRECORD, e, &evt.records, &num_records); … … 1020 1038 } 1021 1039 1022 ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL,&evt,1040 ndr_err = ndr_push_struct_blob(&blob, mem_ctx, &evt, 1023 1041 (ndr_push_flags_fn_t)ndr_push_EVENTLOG_EVT_FILE); 1024 1042 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
Note:
See TracChangeset
for help on using the changeset viewer.