Changeset 587 for vendor/current/source3/utils
- Timestamp:
- Jun 29, 2011, 7:36:41 AM (14 years ago)
- Location:
- vendor/current/source3/utils
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/utils/net_ads.c
r414 r587 542 542 DOM_SID primary_group_sid; 543 543 uint32_t group_rid; 544 enum SID_NAME_USEtype;544 enum wbcSidType type; 545 545 546 546 if (argc < 1 || c->display_usage) { … … 597 597 NULL, /* don't look up domain */ 598 598 &primary_group, 599 (enum wbcSidType *)&type);599 &type); 600 600 if (!WBC_ERROR_IS_OK(wbc_status)) { 601 601 d_fprintf(stderr, "wbcLookupSid: %s\n", -
vendor/current/source3/utils/net_rpc_printer.c
r427 r587 755 755 NTSTATUS status; 756 756 struct spoolss_SetPrinterInfoCtr info_ctr; 757 struct spoolss_SetPrinterInfo2 info2; 757 758 struct spoolss_DevmodeContainer devmode_ctr; 758 759 struct sec_desc_buf secdesc_ctr; … … 774 775 break; 775 776 case 2: 776 info_ctr.info.info2 = (struct spoolss_SetPrinterInfo2 *)777 (void *)&info->info2;777 spoolss_printerinfo2_to_setprinterinfo2(&info->info2, &info2); 778 info_ctr.info.info2 = &info2; 778 779 break; 779 780 case 3: … … 2045 2046 for (i = 0; i < num_printers; i++) { 2046 2047 2048 struct spoolss_SetPrinterInfo2 info2; 2049 2047 2050 /* do some initialization */ 2048 2051 printername = info_enum[i].info2.printername; … … 2096 2099 2097 2100 info_ctr.level = level; 2098 info_ctr.info.info2 = (struct spoolss_SetPrinterInfo2 *)2099 (void *)&info_src.info2;2101 spoolss_printerinfo2_to_setprinterinfo2(&info_src.info2, &info2); 2102 info_ctr.info.info2 = &info2; 2100 2103 2101 2104 result = rpccli_spoolss_addprinterex(pipe_hnd_dst, -
vendor/current/source3/utils/net_rpc_registry.c
r414 r587 1151 1151 1152 1152 d_printf(_("Opening %s...."), argv[1]); 1153 if ( !(outfile = regfio_open( argv[1], (O_RDWR|O_CREAT|O_TRUNC), (S_IREAD|S_IWRITE) )) ) { 1153 if ( !(outfile = regfio_open( argv[1], (O_RDWR|O_CREAT|O_TRUNC), 1154 (S_IRUSR|S_IWUSR) )) ) { 1154 1155 d_fprintf(stderr, _("Failed to open %s for writing\n"),argv[1]); 1155 1156 goto out; -
vendor/current/source3/utils/profiles.c
r414 r587 276 276 } 277 277 278 if ( !(outfile = regfio_open( new_filename, (O_RDWR|O_CREAT|O_TRUNC), (S_IREAD|S_IWRITE) )) ) { 278 if ( !(outfile = regfio_open( new_filename, (O_RDWR|O_CREAT|O_TRUNC), 279 (S_IRUSR|S_IWUSR) )) ) { 279 280 fprintf( stderr, "Failed to open new file %s!\n", new_filename ); 280 281 fprintf( stderr, "Error was (%s)\n", strerror(errno) ); -
vendor/current/source3/utils/smbfilter.c
r414 r587 75 75 } 76 76 77 static void filter_request(char *buf )77 static void filter_request(char *buf, size_t buf_len) 78 78 { 79 79 int msg_type = CVAL(buf,0); 80 80 int type = CVAL(buf,smb_com); 81 unsigned x; 81 82 fstring name1,name2; 82 unsigned x; 83 int name_len1, name_len2; 84 int name_type1, name_type2; 83 85 84 86 if (msg_type) { 85 87 /* it's a netbios special */ 86 switch (msg_type) {88 switch (msg_type) 87 89 case 0x81: 88 90 /* session request */ 89 name_extract(buf,4,name1); 90 name_extract(buf,4 + name_len(buf + 4),name2); 91 /* inbuf_size is guaranteed to be at least 4. */ 92 name_len1 = name_len((unsigned char *)(buf+4), 93 buf_len - 4); 94 if (name_len1 <= 0 || name_len1 > buf_len - 4) { 95 DEBUG(0,("Invalid name length in session request\n")); 96 return; 97 } 98 name_len2 = name_len((unsigned char *)(buf+4+name_len1), 99 buf_len - 4 - name_len1); 100 if (name_len2 <= 0 || name_len2 > buf_len - 4 - name_len1) { 101 DEBUG(0,("Invalid name length in session request\n")); 102 return; 103 } 104 105 name_type1 = name_extract((unsigned char *)buf, 106 buf_len,(unsigned int)4,name1); 107 name_type2 = name_extract((unsigned char *)buf, 108 buf_len,(unsigned int)(4 + name_len1),name2); 109 110 if (name_type1 == -1 || name_type2 == -1) { 111 DEBUG(0,("Invalid name type in session request\n")); 112 return; 113 } 114 91 115 d_printf("sesion_request: %s -> %s\n", 92 116 name1, name2); … … 98 122 * name */ 99 123 memcpy(buf+4, mangled, 100 name_len(mangled)); 124 name_len((unsigned char *)mangled, 125 talloc_get_size(mangled))); 101 126 TALLOC_FREE(mangled); 102 127 } 103 128 } 104 }105 129 return; 106 130 } … … 119 143 break; 120 144 } 121 122 145 } 123 146 … … 185 208 exit(0); 186 209 } 187 filter_request(packet );210 filter_request(packet, len); 188 211 if (!send_smb(s, packet)) { 189 212 d_printf("server is dead\n");
Note:
See TracChangeset
for help on using the changeset viewer.