[jcifs] NT_TRANSACT_NOTIFY_CHANGE. Flag Recursive Error

Federico POGGIO fpoggio at elephantmemo.com
Tue Apr 15 14:36:11 GMT 2008


 

 

I have developed a NT_TRANSACT_NOTIFY_CHANGE that use a protocol
SmbComNtTransaction

 

My implementation work but I have a problem with recursive for monitor all
sub-directory.

 

I look an implementation on the source files in samba and I look that

 

static int call_nt_transact_notify_change(connection_struct *conn, char
*inbuf,

                               char *outbuf, int length,

                               int bufsize, 

                               uint16 **ppsetup, uint32 setup_count,

                               char **ppparams,

                               uint32 parameter_count,

                               char **ppdata, uint32 data_count,

                               uint32 max_data_count,

                               uint32 max_param_count)

 

{

:::....

 

      recursive = (SVAL(setup, 6) != 0) ? True : False;

 

// If I watch this flag, this value = 1

      

      

 

}

 

I look that this recursive variable is take in parameter in the 

status = change_notify_add_request(inbuf, max_param_count, filter,

                  recursive, fsp);

 

but in this method : the recursive variable is never used.

 

 

NTSTATUS change_notify_add_request(const char *inbuf, uint32 max_param,

                           uint32 filter, BOOL recursive,

                           struct files_struct *fsp)

{

      struct notify_change_request *request = NULL;

      struct notify_mid_map *map = NULL;

 

      if (!(request = SMB_MALLOC_P(struct notify_change_request))

          || !(map = SMB_MALLOC_P(struct notify_mid_map))) {

            SAFE_FREE(request);

            return NT_STATUS_NO_MEMORY;

      }

 

      request->mid_map = map;

      map->req = request;

 

      memcpy(request->request_buf, inbuf, sizeof(request->request_buf));

      request->max_param = max_param;

      request->filter = filter;

      request->fsp = fsp;

      request->backend_data = NULL;

      

 

      DLIST_ADD_END(fsp->notify->requests, request,

                  struct notify_change_request *);

 

      map->mid = SVAL(inbuf, smb_mid);

      DLIST_ADD(notify_changes_by_mid, map);

 

      /* Push the MID of this packet on the signing queue. */

      srv_defer_sign_response(SVAL(inbuf,smb_mid));

 

      return NT_STATUS_OK;

}

 

 

 

Thank for reply.

 

 

Federico POGGIO

 

 

-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list