~ssalley/ubuntu/maverick/likewise-open/likewise-open.fix627272

« back to all changes in this revision

Viewing changes to lwreg/server/providers/sqlite/sqliteapi.c

  • Committer: Bazaar Package Importer
  • Author(s): Gerald Carter, Michael Casadevall, Gerald Carter
  • Date: 2010-03-13 07:42:44 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100313074244-j1gy0zo19cc32xhl
Tags: 5.4.0.42111-1
[ Michael Casadevall ]
* LP: #517300
  - added debian/patches/disable_parallel_builds.diff to allow successful builds
    on non-x86 architectures caused by improperly parsing /proc/cpuinfo to
    determine the number of CPUs and set make -jX.
  - added debian/patches/correct_lwio_configure_detection.diff to correct configure
    tests for properly checking proc filesystems on non-x86 linux platforms
  - added ${misc:Depends} to Depends lines to satisfy lintian
  - Added debian/README.source to satisfy lintian 
  - Bumped standards version to 3.8.3

[ Gerald Carter ]
* New upstream release. (LP: #538616)
* likewise-open.install: Include uninstalled binaries and ncalrpc
    servers required for domainjoin-cli {join,leave}
* patches/version-in-share.diff:
  - Corrected location of VERSION file in lsassd

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    DWORD dwError = ERROR_SUCCESS;
66
66
    int iCount = 0;
67
67
    BYTE pSecDescRel[SECURITY_DESCRIPTOR_RELATIVE_MAX_SIZE] = {0};
68
 
    ULONG ulSecDescLen = SECURITY_DESCRIPTOR_RELATIVE_MAX_SIZE;
 
68
    ULONG ulSecDescLength = SECURITY_DESCRIPTOR_RELATIVE_MAX_SIZE;
69
69
 
70
70
 
71
71
    dwError = RegDbOpen(REG_CACHE,
76
76
                    2 * 1024,
77
77
                    RegHashCaselessWC16StringCompare,
78
78
                    RegHashCaselessWc16String,
79
 
                    SqliteCacheFreeHashEntry,
 
79
                    SqliteCacheFreeKeyCtxHashEntry,
80
80
                    NULL,
81
81
                    &gActiveKeyList.pKeyList);
82
82
    BAIL_ON_REG_ERROR(dwError);
83
83
 
 
84
    dwError = RegHashCreate(
 
85
                    2 * 1024,
 
86
                    RegHashCaselessWC16StringCompare,
 
87
                    RegHashCaselessWc16String,
 
88
                    SqliteCacheFreeDbKeyHashEntry,
 
89
                    NULL,
 
90
                    &gRegDbKeyList.pKeyList);
 
91
    BAIL_ON_REG_ERROR(dwError);
 
92
 
84
93
    // Creating default SD to create registry root key(s)
85
 
    dwError = RegSrvCreateDefaultSecDescRel((PSECURITY_DESCRIPTOR_RELATIVE)pSecDescRel, &ulSecDescLen);
 
94
    dwError = RegSrvCreateDefaultSecDescRel((PSECURITY_DESCRIPTOR_RELATIVE)pSecDescRel, &ulSecDescLength);
86
95
    BAIL_ON_REG_ERROR(dwError);
87
96
 
88
97
    for (iCount = 0; iCount < NUM_ROOTKEY; iCount++)
93
102
                                                                           ppwszRootKeyNames[iCount],
94
103
                                                                           0,
95
104
                                                                           (PSECURITY_DESCRIPTOR_RELATIVE)pSecDescRel,
96
 
                                                                           ulSecDescLen,
 
105
                                                                           ulSecDescLength,
 
106
                                                                           NULL,
97
107
                                                                           NULL));
98
108
        if (LWREG_ERROR_KEYNAME_EXIST == dwError)
99
109
        {
117
127
    PREGPROV_PROVIDER_FUNCTION_TABLE pFnTable
118
128
    )
119
129
{
120
 
    REG_HASH_ITERATOR hashIterator = {0};
121
 
    REG_HASH_ENTRY*   pHashEntry = NULL;
122
 
 
123
130
    RegDbSafeClose(&ghCacheConnection);
124
131
 
125
132
    if (gActiveKeyList.pKeyList)
126
133
    {
127
 
        RegHashGetIterator(gActiveKeyList.pKeyList, &hashIterator);
128
 
        while ((pHashEntry = RegHashNext(&hashIterator)) != NULL)
129
 
        {
130
 
            SqliteCacheFreeHashEntry(pHashEntry);
131
 
        }
132
 
 
133
134
        RegHashSafeFree(&gActiveKeyList.pKeyList);
134
135
    }
 
136
 
 
137
    if (gRegDbKeyList.pKeyList)
 
138
    {
 
139
        RegHashSafeFree(&gRegDbKeyList.pKeyList);
 
140
    }
135
141
}
136
142
 
137
143
NTSTATUS
139
145
    IN HANDLE Handle,
140
146
    IN HKEY hKey,
141
147
    IN PCWSTR pSubKey,
142
 
    IN DWORD Reserved,
 
148
    IN DWORD dwReserved,
143
149
    IN OPTIONAL PWSTR pClass,
144
150
    IN DWORD dwOptions,
145
151
    IN ACCESS_MASK AccessDesired,
146
152
    IN OPTIONAL PSECURITY_DESCRIPTOR_RELATIVE pSecDescRel,
147
 
    IN ULONG ulSecDescLen,
 
153
    IN ULONG ulSecDescLength,
148
154
    OUT PHKEY phkResult,
149
155
    OUT OPTIONAL PDWORD pdwDisposition
150
156
    )
157
163
 
158
164
    BAIL_ON_NT_INVALID_POINTER(pKeyHandle);
159
165
    BAIL_ON_NT_INVALID_POINTER(pSubKey);
 
166
    BAIL_ON_INVALID_RESERVED_VALUE(dwReserved);
 
167
 
160
168
    pKeyCtx = pKeyHandle->pKey;
161
169
    BAIL_ON_INVALID_KEY_CONTEXT(pKeyCtx);
162
170
 
 
171
    // Check key length
 
172
    if (wc16slen(pSubKey) > MAX_KEY_LENGTH)
 
173
    {
 
174
        status = STATUS_INVALID_BLOCK_LENGTH;
 
175
        BAIL_ON_NT_STATUS(status);
 
176
    }
 
177
 
 
178
    // check whether key is valid
163
179
        if (!RegSrvIsValidKeyName(pSubKey))
164
180
        {
165
 
                //invalid keyName passed in
166
181
                status = STATUS_OBJECT_NAME_INVALID;
167
182
                BAIL_ON_NT_STATUS(status);
168
183
        }
169
184
 
170
 
        RegSrvReferenceKeyContext(pKeyCtx);
171
 
 
172
185
        // Check whether create subkey is allowed on parentKey
173
186
        status = RegSrvAccessCheckKeyHandle(pKeyHandle,
174
187
                                                    KEY_CREATE_SUB_KEY);
187
200
                   pwszKeyNameWithSubKey,
188
201
                   AccessDesired,
189
202
                   pSecDescRel,
190
 
                   ulSecDescLen,
191
 
               (PREG_KEY_HANDLE*)phkResult);
 
203
                   ulSecDescLength,
 
204
               (PREG_KEY_HANDLE*)phkResult,
 
205
               pdwDisposition);
192
206
    BAIL_ON_NT_STATUS(status);
193
207
 
194
208
cleanup:
195
 
    RegSrvReleaseKeyContext(pKeyCtx);
196
209
    LWREG_SAFE_FREE_MEMORY(pwszKeyNameWithSubKey);
197
210
 
198
211
    return status;
221
234
    if (pKeyHandle)
222
235
    {
223
236
        pKey = pKeyHandle->pKey;
224
 
        RegSrvReferenceKeyContext(pKey);
225
237
 
226
238
        if (LW_IS_NULL_OR_EMPTY_STR(pKey->pwszKeyName))
227
239
        {
255
267
    *phkResult = (HKEY)pOpenKeyHandle;
256
268
 
257
269
cleanup:
258
 
    RegSrvReleaseKeyContext(pKey);
259
270
 
260
271
    LWREG_SAFE_FREE_MEMORY(pwszKeyNameWithSubKey);
261
272
 
289
300
    if (pKeyHandle)
290
301
    {
291
302
        pKey = pKeyHandle->pKey;
292
 
        RegSrvReferenceKeyContext(pKey);
293
303
 
294
304
        if (LW_IS_NULL_OR_EMPTY_STR(pKey->pwszKeyName))
295
305
        {
323
333
    *phkResult = (HKEY)pOpenKeyHandle;
324
334
 
325
335
cleanup:
326
 
    RegSrvReleaseKeyContext(pKey);
327
336
 
328
337
    LWREG_SAFE_FREE_MEMORY(pwszKeyNameWithSubKey);
329
338
 
368
377
 
369
378
    BAIL_ON_NT_INVALID_POINTER(pSubKey);
370
379
 
371
 
    RegSrvReferenceKeyContext(pKey);
372
 
 
373
380
    status = LwRtlWC16StringAllocatePrintfW(
374
381
                    &pwszKeyName,
375
382
                    L"%ws\\%ws",
384
391
    BAIL_ON_NT_STATUS(status);
385
392
 
386
393
cleanup:
387
 
    RegSrvReleaseKeyContext(pKey);
388
394
    LWREG_SAFE_FREE_MEMORY(pwszKeyName);
389
395
 
390
396
    return status;
443
449
    IN HKEY hKey,
444
450
    OUT PWSTR pClass, /*A pointer to a buffer that receives the user-defined class of the key. This parameter can be NULL.*/
445
451
    IN OUT OPTIONAL PDWORD pcClass,
446
 
    IN PDWORD pReserved,/*This parameter is reserved and must be NULL.*/
 
452
    IN PDWORD pdwReserved,/*This parameter is reserved and must be NULL.*/
447
453
    OUT OPTIONAL PDWORD pcSubKeys,
448
454
    OUT OPTIONAL PDWORD pcMaxSubKeyLen,
449
455
    OUT OPTIONAL PDWORD pcMaxClassLen,/*implement this later*/
462
468
    PREG_KEY_HANDLE pKeyHandle = (PREG_KEY_HANDLE)hKey;
463
469
    PREG_KEY_CONTEXT pKeyCtx = NULL;
464
470
 
465
 
 
466
471
    BAIL_ON_NT_INVALID_POINTER(pKeyHandle);
 
472
    BAIL_ON_INVALID_RESERVED_POINTER(pdwReserved);
467
473
 
468
474
    status = RegSrvAccessCheckKeyHandle(pKeyHandle, KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE);
469
475
    BAIL_ON_NT_STATUS(status);
472
478
 
473
479
    BAIL_ON_INVALID_KEY_CONTEXT(pKeyCtx);
474
480
 
475
 
    RegSrvReferenceKeyContext(pKeyCtx);
476
 
 
477
481
    LWREG_LOCK_RWMUTEX_EXCLUSIVE(bInLock, &pKeyCtx->mutex);
478
482
 
479
483
    status = SqliteCacheSubKeysInfo_inlock(pKeyCtx);
512
516
        } while (sNumValues);
513
517
    }
514
518
 
 
519
    status = SqliteCacheKeySecurityDescriptor_inlock(pKeyCtx);
 
520
    BAIL_ON_NT_STATUS(status);
 
521
 
515
522
    if (pcSubKeys)
516
523
    {
517
524
        *pcSubKeys = pKeyCtx->dwNumSubKeys;
532
539
    {
533
540
        *pcMaxValueLen = pKeyCtx->sMaxValueLen;
534
541
    }
 
542
    if (pcbSecurityDescriptor)
 
543
    {
 
544
        *pcbSecurityDescriptor = (DWORD)pKeyCtx->ulSecDescLength;
 
545
    }
535
546
 
536
547
cleanup:
537
548
    LWREG_UNLOCK_RWMUTEX(bInLock, &pKeyCtx->mutex);
538
 
    RegSrvReleaseKeyContext(pKeyCtx);
539
549
 
540
550
    return status;
541
551
 
571
581
    IN DWORD dwIndex,
572
582
    OUT PWSTR pName, /*buffer to hold keyName*/
573
583
    IN OUT PDWORD pcName,/*When the function returns, the variable receives the number of characters stored in the buffer,not including the terminating null character.*/
574
 
    IN PDWORD pReserved,
 
584
    IN PDWORD pdwReserved,
575
585
    IN OUT PWSTR pClass,
576
586
    IN OUT OPTIONAL PDWORD pcClass,
577
587
    OUT PFILETIME pftLastWriteTime
588
598
    PREG_KEY_CONTEXT pKeyCtx = NULL;
589
599
 
590
600
    BAIL_ON_NT_INVALID_POINTER(pKeyHandle);
 
601
    BAIL_ON_INVALID_RESERVED_POINTER(pdwReserved);
591
602
 
592
603
    status = RegSrvAccessCheckKeyHandle(pKeyHandle, KEY_ENUMERATE_SUB_KEYS);
593
604
    BAIL_ON_NT_STATUS(status);
595
606
    pKeyCtx = pKeyHandle->pKey;
596
607
 
597
608
    BAIL_ON_INVALID_KEY_CONTEXT(pKeyCtx);
598
 
    BAIL_ON_NT_INVALID_POINTER(pName); // the size of pName is *pcName
 
609
    // the size of pName is *pcName
 
610
    BAIL_ON_NT_INVALID_POINTER(pName);
599
611
    BAIL_ON_NT_INVALID_POINTER(pcName);
600
612
 
601
 
    RegSrvReferenceKeyContext(pKeyCtx);
602
 
 
603
613
    LWREG_LOCK_RWMUTEX_EXCLUSIVE(bInLock, &pKeyCtx->mutex);
604
614
 
605
 
    //Try to grab information from pKeyResults:
606
 
    //if subkey information is not yet available in pKeyResult, do it here
607
 
    //Otherwise, use this information
 
615
    // Try to grab information from pKeyResults:
 
616
    // if subkey information is not yet available in pKeyResult, do it here
 
617
    // Otherwise, use this information
608
618
    status = SqliteCacheSubKeysInfo_inlock(pKeyCtx);
609
619
    BAIL_ON_NT_STATUS(status);
610
620
 
662
672
    LWREG_UNLOCK_RWMUTEX(bInLock, &pKeyCtx->mutex);
663
673
 
664
674
    RegDbSafeFreeEntryKeyList(sNumSubKeys,&ppRegEntries);
665
 
    RegSrvReleaseKeyContext(pKeyCtx);
666
675
 
667
676
    return status;
668
677
 
679
688
    IN DWORD dwIndex,
680
689
    OUT PWSTR pName, /*buffer to hold keyName*/
681
690
    IN OUT PDWORD pcName,/*When the function returns, the variable receives the number of characters stored in the buffer,not including the terminating null character.*/
682
 
    IN PDWORD pReserved,
 
691
    IN PDWORD pdwReserved,
683
692
    IN OUT PWSTR pClass,
684
693
    IN OUT OPTIONAL PDWORD pcClass,
685
694
    OUT PFILETIME pftLastWriteTime
696
705
    PREG_KEY_CONTEXT pKeyCtx = NULL;
697
706
 
698
707
    BAIL_ON_NT_INVALID_POINTER(pKeyHandle);
 
708
    BAIL_ON_INVALID_RESERVED_POINTER(pdwReserved);
699
709
 
700
710
    status = RegSrvAccessCheckKeyHandle(pKeyHandle, KEY_ENUMERATE_SUB_KEYS);
701
711
    BAIL_ON_NT_STATUS(status);
706
716
    BAIL_ON_NT_INVALID_POINTER(pName); // the size of pName is *pcName
707
717
    BAIL_ON_NT_INVALID_POINTER(pcName);
708
718
 
709
 
    RegSrvReferenceKeyContext(pKeyCtx);
710
 
 
711
719
    LWREG_LOCK_RWMUTEX_EXCLUSIVE(bInLock, &pKeyCtx->mutex);
712
720
 
713
 
    //Try to grab information from pKeyResults:
714
 
    //if subkey information is not yet available in pKeyResult, do it here
715
 
    //Otherwise, use this information
 
721
    // Try to grab information from pKeyResults:
 
722
    // if subkey information is not yet available in pKeyResult, do it here
 
723
    // Otherwise, use this information
716
724
    status = SqliteCacheSubKeysInfo_inlock_inDblock(pKeyCtx);
717
725
    BAIL_ON_NT_STATUS(status);
718
726
 
770
778
    LWREG_UNLOCK_RWMUTEX(bInLock, &pKeyCtx->mutex);
771
779
 
772
780
    RegDbSafeFreeEntryKeyList(sNumSubKeys,&ppRegEntries);
773
 
    RegSrvReleaseKeyContext(pKeyCtx);
774
781
 
775
782
    return status;
776
783
 
785
792
    IN HANDLE Handle,
786
793
    IN HKEY hKey,
787
794
    IN OPTIONAL PCWSTR pValueName,
788
 
    IN DWORD Reserved,
 
795
    IN DWORD dwReserved,
789
796
    IN DWORD dwType,
790
797
    IN const BYTE *pData,
791
798
    DWORD cbData
801
808
    PREG_KEY_CONTEXT pKeyCtx = NULL;
802
809
 
803
810
    BAIL_ON_NT_INVALID_POINTER(pKeyHandle);
 
811
    BAIL_ON_INVALID_RESERVED_VALUE(dwReserved);
804
812
 
805
813
    status = RegSrvAccessCheckKeyHandle(pKeyHandle, KEY_SET_VALUE);
806
814
    BAIL_ON_NT_STATUS(status);
808
816
    pKeyCtx = pKeyHandle->pKey;
809
817
    BAIL_ON_INVALID_KEY_CONTEXT(pKeyCtx);
810
818
 
811
 
    RegSrvReferenceKeyContext(pKeyCtx);
812
 
 
813
819
    if (MAX_VALUE_LENGTH < cbData)
814
820
    {
815
821
        status = STATUS_INVALID_BLOCK_LENGTH;
881
887
    SqliteCacheResetKeyValueInfo(pKeyCtx->pwszKeyName);
882
888
 
883
889
cleanup:
884
 
    RegSrvReleaseKeyContext(pKeyCtx);
885
890
 
886
891
    LWREG_SAFE_FREE_MEMORY(pwszValueName);
887
892
    LWREG_SAFE_FREE_MEMORY(pwcValue);
924
929
    pKeyCtx = pKeyHandle->pKey;
925
930
    BAIL_ON_INVALID_KEY_CONTEXT(pKeyCtx);
926
931
 
927
 
    RegSrvReferenceKeyContext(pKeyCtx);
928
 
 
929
932
    if (pSubKey)
930
933
    {
931
934
        status = LwRtlWC16StringAllocatePrintfW(
944
947
                                                                   &pKeyHandleInUse);
945
948
        BAIL_ON_NT_STATUS(status);
946
949
 
947
 
        //ACL check
 
950
        // ACL check
948
951
    status = RegSrvAccessCheckKeyHandle(pKeyHandleInUse, KEY_QUERY_VALUE);
949
952
    BAIL_ON_NT_STATUS(status);
950
953
 
971
974
    *pdwType = (DWORD)pRegEntry->type;
972
975
 
973
976
cleanup:
974
 
    RegSrvReleaseKeyContext(pKeyCtx);
975
977
    SqliteSafeFreeKeyHandle(pKeyHandleInUse);
976
978
    LWREG_SAFE_FREE_MEMORY(pwszValueName);
977
979
    LWREG_SAFE_FREE_MEMORY(pwszKeyNameWithSubKey);
1007
1009
    pKeyCtx = pKeyHandle->pKey;
1008
1010
    BAIL_ON_INVALID_KEY_CONTEXT(pKeyCtx);
1009
1011
 
1010
 
    RegSrvReferenceKeyContext(pKeyCtx);
1011
 
 
1012
1012
    if (pSubKey)
1013
1013
    {
1014
1014
        status = LwRtlWC16StringAllocatePrintfW(
1028
1028
                                                                   &pKeyHandleInUse);
1029
1029
        BAIL_ON_NT_STATUS(status);
1030
1030
 
1031
 
        //ACL check
 
1031
        // ACL check
1032
1032
    status = RegSrvAccessCheckKeyHandle(pKeyHandleInUse, KEY_SET_VALUE);
1033
1033
    BAIL_ON_NT_STATUS(status);
1034
1034
 
1054
1054
    SqliteCacheResetKeyValueInfo(pKeyCtxInUse->pwszKeyName);
1055
1055
 
1056
1056
cleanup:
1057
 
    RegSrvReleaseKeyContext(pKeyCtx);
1058
1057
    SqliteSafeFreeKeyHandle(pKeyHandleInUse);
1059
1058
    LWREG_SAFE_FREE_MEMORY(pwszValueName);
1060
1059
    LWREG_SAFE_FREE_MEMORY(pwszKeyNameWithSubKey);
1079
1078
    PREG_KEY_CONTEXT pKeyCtx = NULL;
1080
1079
 
1081
1080
    BAIL_ON_NT_INVALID_POINTER(pKeyHandle);
1082
 
        //ACL check
 
1081
        // ACL check
1083
1082
    status = RegSrvAccessCheckKeyHandle(pKeyHandle, KEY_SET_VALUE);
1084
1083
    BAIL_ON_NT_STATUS(status);
1085
1084
 
1086
1085
    pKeyCtx = pKeyHandle->pKey;
1087
1086
    BAIL_ON_INVALID_KEY_CONTEXT(pKeyCtx);
1088
1087
 
1089
 
    RegSrvReferenceKeyContext(pKeyCtx);
1090
 
 
1091
1088
    status = LwRtlWC16StringDuplicate(&pwszValueName, !pValueName ? wszEmptyValueName : pValueName);
1092
1089
    BAIL_ON_NT_STATUS(status);
1093
1090
 
1107
1104
    SqliteCacheResetKeyValueInfo(pKeyCtx->pwszKeyName);
1108
1105
 
1109
1106
cleanup:
1110
 
    RegSrvReleaseKeyContext(pKeyCtx);
1111
1107
    LWREG_SAFE_FREE_MEMORY(pwszValueName);
1112
1108
 
1113
1109
    return status;
1123
1119
    IN DWORD dwIndex,
1124
1120
    OUT PWSTR pValueName, /*buffer hold valueName*/
1125
1121
    IN OUT PDWORD pcchValueName, /*input - buffer pValueName length*/
1126
 
    IN PDWORD pReserved,
 
1122
    IN PDWORD pdwReserved,
1127
1123
    OUT OPTIONAL PDWORD pType,
1128
1124
    OUT OPTIONAL PBYTE pData,/*buffer hold value content*/
1129
1125
    IN OUT OPTIONAL PDWORD pcbData /*input - buffer pData length*/
1137
1133
    PREG_DB_VALUE* ppRegEntries = NULL;
1138
1134
    // Do not free
1139
1135
    PBYTE pValueContent = NULL;
1140
 
    //Do not free
 
1136
    // Do not free
1141
1137
    PWSTR pValName = NULL;
1142
1138
    DWORD dwValueLen = 0;
1143
1139
    PREG_KEY_HANDLE pKeyHandle = (PREG_KEY_HANDLE)hKey;
1144
1140
    PREG_KEY_CONTEXT pKeyCtx = NULL;
1145
1141
 
1146
1142
    BAIL_ON_NT_INVALID_POINTER(pKeyHandle);
1147
 
        //ACL check
 
1143
    BAIL_ON_INVALID_RESERVED_POINTER(pdwReserved);
 
1144
        // ACL check
1148
1145
    status = RegSrvAccessCheckKeyHandle(pKeyHandle, KEY_QUERY_VALUE);
1149
1146
    BAIL_ON_NT_STATUS(status);
1150
1147
 
1153
1150
    BAIL_ON_NT_INVALID_POINTER(pValueName); // the size of pName is *pcName
1154
1151
    BAIL_ON_NT_INVALID_POINTER(pcchValueName);
1155
1152
 
1156
 
 
1157
 
    RegSrvReferenceKeyContext(pKeyCtx);
1158
 
 
1159
1153
    LWREG_LOCK_RWMUTEX_EXCLUSIVE(bInLock, &pKeyCtx->mutex);
1160
1154
 
1161
 
    //Try to grab information from pKeyResults:
1162
 
    //if subkey information is not yet available in pKeyResult, do it here
1163
 
    //Otherwise, use this information
 
1155
    // Try to grab information from pKeyResults:
 
1156
    // if subkey information is not yet available in pKeyResult, do it here
 
1157
    // Otherwise, use this information
1164
1158
    status = SqliteCacheKeyValuesInfo_inlock(pKeyCtx);
1165
1159
    BAIL_ON_NT_STATUS(status);
1166
1160
 
1236
1230
    LWREG_UNLOCK_RWMUTEX(bInLock, &pKeyCtx->mutex);
1237
1231
 
1238
1232
    RegDbSafeFreeEntryValueList(sNumValues,&ppRegEntries);
1239
 
    RegSrvReleaseKeyContext(pKeyCtx);
1240
1233
 
1241
1234
    return status;
1242
1235
 
1267
1260
    PSTR pszError = NULL;
1268
1261
    PREG_DB_CONNECTION pConn = (PREG_DB_CONNECTION)ghCacheConnection;
1269
1262
 
1270
 
        //ACL check
 
1263
        // ACL check
1271
1264
    status = RegSrvAccessCheckKeyHandle(pKeyHandle, KEY_ALL_ACCESS | DELETE);
1272
1265
    BAIL_ON_NT_STATUS(status);
1273
1266
 
1371
1364
    BAIL_ON_INVALID_KEY_CONTEXT(pKeyCtx);
1372
1365
    BAIL_ON_NT_INVALID_POINTER(pVal_list);
1373
1366
 
1374
 
    RegSrvReferenceKeyContext(pKeyCtx);
1375
 
 
1376
1367
    if (!num_vals)
1377
1368
    {
1378
1369
        goto cleanup;
1418
1409
    }
1419
1410
 
1420
1411
cleanup:
1421
 
    RegSrvReleaseKeyContext(pKeyCtx);
1422
1412
 
1423
1413
    if (pdwTotalsize)
1424
1414
    {