Changeset 591 for vendor/current/source3
- Timestamp:
- Jul 1, 2011, 9:17:44 AM (14 years ago)
- Location:
- vendor/current/source3
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/VERSION
r587 r591 26 26 SAMBA_VERSION_MAJOR=3 27 27 SAMBA_VERSION_MINOR=5 28 SAMBA_VERSION_RELEASE= 628 SAMBA_VERSION_RELEASE=7 29 29 30 30 ######################################################## -
vendor/current/source3/client/client.c
r414 r591 4421 4421 again: 4422 4422 4423 if (cli->fd == -1) 4423 if (cli->fd < 0 || cli->fd >= FD_SETSIZE) { 4424 errno = EBADF; 4424 4425 return; 4426 } 4425 4427 4426 4428 FD_ZERO(&fds); -
vendor/current/source3/client/dnsbrowse.c
r414 r591 80 80 if (fdset != NULL) { 81 81 TALLOC_FREE(fdset); 82 } 83 84 if (mdnsfd < 0 || mdnsfd >= FD_SETSIZE) { 85 errno = EBADF; 86 break; 82 87 } 83 88 … … 182 187 } 183 188 189 if (mdnsfd < 0 || mdnsfd >= FD_SETSIZE) { 190 errno = EBADF; 191 TALLOC_FREE(ctx); 192 return 1; 193 } 194 184 195 fdsetsz = howmany(mdnsfd + 1, NFDBITS) * sizeof(fd_mask); 185 196 fdset = TALLOC_ZERO(ctx, fdsetsz); -
vendor/current/source3/include/version.h
r587 r591 2 2 #define SAMBA_VERSION_MAJOR 3 3 3 #define SAMBA_VERSION_MINOR 5 4 #define SAMBA_VERSION_RELEASE 65 #define SAMBA_VERSION_OFFICIAL_STRING "3.5. 6"4 #define SAMBA_VERSION_RELEASE 7 5 #define SAMBA_VERSION_OFFICIAL_STRING "3.5.7" 6 6 #ifdef SAMBA_VERSION_VENDOR_FUNCTION 7 7 # define SAMBA_VERSION_STRING SAMBA_VERSION_VENDOR_FUNCTION -
vendor/current/source3/lib/events.c
r427 r591 56 56 57 57 for (fde = ev->fd_events; fde; fde = fde->next) { 58 if (fde->fd < 0 || fde->fd >= FD_SETSIZE) { 59 /* We ignore here, as it shouldn't be 60 possible to add an invalid fde->fd 61 but we don't want FD_SET to see an 62 invalid fd. */ 63 continue; 64 } 65 58 66 if (fde->flags & EVENT_FD_READ) { 59 67 FD_SET(fde->fd, read_fds); -
vendor/current/source3/lib/g_lock.c
r453 r591 392 392 FD_ZERO(r_fds); 393 393 max_fd = ctdbd_conn_get_fd(conn); 394 FD_SET(max_fd, r_fds); 394 if (max_fd >= 0 && max_fd < FD_SETSIZE) { 395 FD_SET(max_fd, r_fds); 396 } 395 397 } 396 398 #endif -
vendor/current/source3/lib/packet.c
r414 r591 108 108 fd_set r_fds; 109 109 110 if (ctx->fd < 0 || ctx->fd >= FD_SETSIZE) { 111 errno = EBADF; 112 return map_nt_error_from_unix(errno); 113 } 114 110 115 FD_ZERO(&r_fds); 111 116 FD_SET(ctx->fd, &r_fds); -
vendor/current/source3/lib/readline.c
r414 r591 92 92 timeout.tv_usec = 0; 93 93 94 if (fd < 0 || fd >= FD_SETSIZE) { 95 errno = EBADF; 96 break; 97 } 98 94 99 FD_ZERO(&fds); 95 100 FD_SET(fd,&fds); -
vendor/current/source3/lib/select.c
r414 r591 76 76 } 77 77 78 if (select_pipe[0] < 0 || select_pipe[0] >= FD_SETSIZE) { 79 DEBUG(0, ("sys_select: bad fd\n")); 80 if (readfds != NULL) 81 FD_ZERO(readfds); 82 if (writefds != NULL) 83 FD_ZERO(writefds); 84 if (errorfds != NULL) 85 FD_ZERO(errorfds); 86 errno = EBADF; 87 return -1; 88 } 78 89 /* 79 90 * These next two lines seem to fix a bug with the Linux … … 102 113 FD_ZERO(readfds2); 103 114 } 115 104 116 FD_SET(select_pipe[0], readfds2); 105 117 -
vendor/current/source3/lib/util_sock.c
r414 r591 496 496 497 497 for (nread=0; nread < mincnt; ) { 498 if (fd < 0 || fd >= FD_SETSIZE) { 499 errno = EBADF; 500 return map_nt_error_from_unix(EBADF); 501 } 502 498 503 FD_ZERO(&fds); 499 504 FD_SET(fd,&fds); … … 1236 1241 for (i=0; i<num_addrs; i++) { 1237 1242 sockets[i] = socket(addrs[i].ss_family, SOCK_STREAM, 0); 1238 if (sockets[i] < 0 )1243 if (sockets[i] < 0 || sockets[i] >= FD_SETSIZE) 1239 1244 goto done; 1240 1245 set_blocking(sockets[i], false); … … 1285 1290 1286 1291 for (i=0; i<num_addrs; i++) { 1287 if (sockets[i] == -1) 1292 if (sockets[i] < 0 || sockets[i] >= FD_SETSIZE) { 1293 /* This cannot happen - ignore if so. */ 1288 1294 continue; 1295 } 1289 1296 FD_SET(sockets[i], &wr_fds); 1290 1297 FD_SET(sockets[i], &r_fds); … … 1306 1313 for (i=0; i<num_addrs; i++) { 1307 1314 1308 if (sockets[i] == -1) 1315 if (sockets[i] < 0 || sockets[i] >= FD_SETSIZE) { 1316 /* This cannot happen - ignore if so. */ 1309 1317 continue; 1318 } 1310 1319 1311 1320 /* Stevens, Network Programming says that if there's a -
vendor/current/source3/libaddns/dnssock.c
r414 r591 220 220 int fd_ready; 221 221 222 if (fd < 0 || fd >= FD_SETSIZE) { 223 /* read timeout */ 224 return ERROR_DNS_SOCKET_ERROR; 225 } 226 222 227 FD_ZERO( &rfds ); 223 228 FD_SET( fd, &rfds ); -
vendor/current/source3/libsmb/nmblib.c
r587 r591 1095 1095 int ret; 1096 1096 1097 if (fd < 0 || fd >= FD_SETSIZE) { 1098 errno = EBADF; 1099 return NULL; 1100 } 1101 1097 1102 FD_ZERO(&fds); 1098 1103 FD_SET(fd,&fds); -
vendor/current/source3/nmbd/nmbd_packets.c
r414 r591 1697 1697 count *= 4; 1698 1698 1699 if(count > FD_SETSIZE) {1699 if(count >= FD_SETSIZE) { 1700 1700 DEBUG(0,("create_listen_fdset: Too many file descriptors needed (%d). We can \ 1701 1701 only use %d.\n", count, FD_SETSIZE)); … … 1713 1713 1714 1714 /* Add in the lp_socket_address() interface on 137. */ 1715 if (ClientNMB < 0 || ClientNMB >= FD_SETSIZE) { 1716 errno = EBADF; 1717 SAFE_FREE(pset); 1718 return True; 1719 } 1720 1715 1721 FD_SET(ClientNMB,pset); 1716 1722 sock_array[num++] = ClientNMB; … … 1722 1728 /* Add in the 137 sockets on all the interfaces. */ 1723 1729 for (subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec)) { 1730 if (subrec->nmb_sock < 0 || subrec->nmb_sock >= FD_SETSIZE) { 1731 /* We have to ignore sockets outside FD_SETSIZE. */ 1732 continue; 1733 } 1724 1734 FD_SET(subrec->nmb_sock,pset); 1725 1735 sock_array[num++] = subrec->nmb_sock; 1726 1736 *maxfd = MAX( *maxfd, subrec->nmb_sock); 1727 1737 1738 if (subrec->nmb_bcast < 0 || subrec->nmb_bcast >= FD_SETSIZE) { 1739 /* We have to ignore sockets outside FD_SETSIZE. */ 1740 continue; 1741 } 1728 1742 sock_array[num++] = subrec->nmb_bcast; 1729 if (subrec->nmb_bcast != -1) { 1730 FD_SET(subrec->nmb_bcast,pset); 1731 *maxfd = MAX( *maxfd, subrec->nmb_bcast); 1732 } 1743 FD_SET(subrec->nmb_bcast,pset); 1744 *maxfd = MAX( *maxfd, subrec->nmb_bcast); 1733 1745 } 1734 1746 1735 1747 /* Add in the lp_socket_address() interface on 138. */ 1748 if (ClientDGRAM < 0 || ClientDGRAM >= FD_SETSIZE) { 1749 errno = EBADF; 1750 SAFE_FREE(pset); 1751 return True; 1752 } 1736 1753 FD_SET(ClientDGRAM,pset); 1737 1754 sock_array[num++] = ClientDGRAM; … … 1743 1760 /* Add in the 138 sockets on all the interfaces. */ 1744 1761 for (subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec)) { 1762 if (subrec->dgram_sock < 0 || subrec->dgram_sock >= FD_SETSIZE) { 1763 /* We have to ignore sockets outside FD_SETSIZE. */ 1764 continue; 1765 } 1745 1766 FD_SET(subrec->dgram_sock,pset); 1746 1767 sock_array[num++] = subrec->dgram_sock; 1747 1768 *maxfd = MAX( *maxfd, subrec->dgram_sock); 1748 1769 1770 if (subrec->dgram_bcast < 0 || subrec->dgram_bcast >= FD_SETSIZE) { 1771 /* We have to ignore sockets outside FD_SETSIZE. */ 1772 continue; 1773 } 1749 1774 sock_array[num++] = subrec->dgram_bcast; 1750 1775 if (subrec->dgram_bcast != -1) { … … 1877 1902 #ifndef SYNC_DNS 1878 1903 dns_fd = asyncdns_fd(); 1879 if (dns_fd != -1) {1904 if (dns_fd >= 0 && dns_fd < FD_SETSIZE) { 1880 1905 FD_SET(dns_fd, &r_fds); 1881 1906 maxfd = MAX( maxfd, dns_fd); -
vendor/current/source3/utils/smbfilter.c
r587 r591 194 194 195 195 FD_ZERO(&fds); 196 if (s != -1) FD_SET(s, &fds);197 if (c != -1) FD_SET(c, &fds);196 if (s >= 0 && s < FD_SETSIZE) FD_SET(s, &fds); 197 if (c >= 0 && c < FD_SETSIZE) FD_SET(c, &fds); 198 198 199 199 num = sys_select_intr(MAX(s+1, c+1),&fds,NULL,NULL,NULL); … … 268 268 269 269 FD_ZERO(&fds); 270 if (s < 0 || s >= FD_SETSIZE) { 271 break; 272 } 270 273 FD_SET(s, &fds); 271 274 -
vendor/current/source3/winbindd/winbindd_dual.c
r478 r591 1461 1461 FD_ZERO(&r_fds); 1462 1462 FD_ZERO(&w_fds); 1463 1464 if (state.sock < 0 || state.sock >= FD_SETSIZE) { 1465 TALLOC_FREE(frame); 1466 perror("EBADF"); 1467 _exit(1); 1468 } 1469 1463 1470 FD_SET(state.sock, &r_fds); 1464 1471 maxfd = state.sock;
Note:
See TracChangeset
for help on using the changeset viewer.