* fix return code so we don't let a client just open any key it wants
authorGerald Carter <jerry@samba.org>
Wed, 24 Jul 2002 19:53:49 +0000 (19:53 +0000)
committerGerald Carter <jerry@samba.org>
Wed, 24 Jul 2002 19:53:49 +0000 (19:53 +0000)
  (even nonexistent ones).  This gets rid of the Scheduling Agent icon.

* fix NT_STATUS return code for bad registry path (NT_STATUS_NO_SUCH_FILE)
(This used to be commit 915ee5c0ec0467fea23be8f309bcaa085c6ed9dd)

source3/registry/reg_db.c
source3/rpc_server/srv_reg_nt.c

index 773a4f7fb5bd8e5b96b93c10b987f5d78fbd1d1d..74012263e5c56c57aa3dfdc787e7f6fb5688b6c8 100644 (file)
@@ -252,8 +252,8 @@ int regdb_fetch_reg_keys( char* key, REGSUBKEY_CTR *ctr )
        buflen = dbuf.dsize;
        
        if ( !buf ) {
-               DEBUG(5,("regdb_fetch_reg_keys: Failed to fetch any subkeys for [%s]\n", key));
-               return 0;
+               DEBUG(5,("regdb_fetch_reg_keys: tdb lookup failed to locate key [%s]\n", key));
+               return -1;
        }
        
        len = tdb_unpack( buf, buflen, "d", &num_items);
index 3afb2a2c81291b5a2f8098df4b8fec980147bb2d..2154b5a38a3312ddaa94acd45e58c0bf5ea448e5 100644 (file)
@@ -127,7 +127,7 @@ static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY
        
                /* don't really know what to return here */
                
-               result = NT_STATUS_ACCESS_DENIED;
+               result = NT_STATUS_NO_SUCH_FILE;
        }
        else {
                /*