#define MAX_SERVER_DISK_ENTRIES 15
-/***************************/
-
-/* oops - this is going to take up a *massive* amount of stack. */
-/* the UNISTR2s already have 1024 uint16 chars in them... */
-
-#define MAX_SESS_ENTRIES 32
-
-/***************************/
-
-/* oops - this is going to take up a *massive* amount of stack. */
-/* the UNISTR2s already have 1024 uint16 chars in them... */
-#define MAX_CONN_ENTRIES 32
-
/* Use for enumerating connections, pipes, & files */
struct file_enum_count {
fenum->ctr3->array = f;
init_srvsvc_NetFileInfo3(&fenum->ctr3->array[i],
- (uint32_t)((procid_to_pid(&prec.pid)<<16) & prec.pnum),
+ (((uint32_t)(procid_to_pid(&prec.pid))<<16) | prec.pnum),
(FILE_READ_DATA|FILE_WRITE_DATA),
0,
fullpath,
/* now fill in the srvsvc_NetFileInfo3 struct */
init_srvsvc_NetFileInfo3(&fenum->ctr3->array[i],
- e->share_file_id,
+ (((uint32_t)(procid_to_pid(&e->pid))<<16) | e->share_file_id),
permissions,
num_locks,
fullpath,
return WERR_OK;
}
- for (; resume_handle < *total_entries && num_entries < MAX_SESS_ENTRIES; resume_handle++) {
+ for (; resume_handle < *total_entries; resume_handle++) {
ctr0->array = TALLOC_REALLOC_ARRAY(p->mem_ctx,
ctr0->array,
*total_entries = list_sessions(p->mem_ctx, &session_list);
- for (; resume_handle < *total_entries && num_entries < MAX_SESS_ENTRIES; resume_handle++) {
+ for (; resume_handle < *total_entries; resume_handle++) {
uint32 num_files;
uint32 connect_time;
struct passwd *pw = sys_getpwnam(session_list[resume_handle].username);
ZERO_STRUCTP(ctr0);
- for (; resume_handle < *total_entries && num_entries < MAX_CONN_ENTRIES; resume_handle++) {
+ for (; resume_handle < *total_entries; resume_handle++) {
ctr0->array = TALLOC_REALLOC_ARRAY(talloc_tos(),
ctr0->array,
ZERO_STRUCTP(ctr1);
- for (; (resume_handle < *total_entries) && num_entries < MAX_CONN_ENTRIES; resume_handle++) {
+ for (; resume_handle < *total_entries; resume_handle++) {
ctr1->array = TALLOC_REALLOC_ARRAY(talloc_tos(),
ctr1->array,