You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-17 01:12:23 +02:00
Use constant string for user/group in performance/type test.
It is not safe to return strings created with STRDEF() from a function.
This commit is contained in:
@ -61,6 +61,8 @@ typedef struct
|
|||||||
uint64_t fileTotal;
|
uint64_t fileTotal;
|
||||||
} StorageTestManifestNewBuild;
|
} StorageTestManifestNewBuild;
|
||||||
|
|
||||||
|
STRING_STATIC(TEST_MANIFEST_PATH_USER_STR, "test");
|
||||||
|
|
||||||
static StorageInfo
|
static StorageInfo
|
||||||
storageTestManifestNewBuildInfo(THIS_VOID, const String *file, StorageInfoLevel level, StorageInterfaceInfoParam param)
|
storageTestManifestNewBuildInfo(THIS_VOID, const String *file, StorageInfoLevel level, StorageInterfaceInfoParam param)
|
||||||
{
|
{
|
||||||
@ -74,8 +76,8 @@ storageTestManifestNewBuildInfo(THIS_VOID, const String *file, StorageInfoLevel
|
|||||||
.mode = 0600,
|
.mode = 0600,
|
||||||
.userId = 100,
|
.userId = 100,
|
||||||
.groupId = 100,
|
.groupId = 100,
|
||||||
.user = STRDEF("test"),
|
.user = TEST_MANIFEST_PATH_USER_STR,
|
||||||
.group = STRDEF("test"),
|
.group = TEST_MANIFEST_PATH_USER_STR,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (strEq(file, STRDEF("/pg")))
|
if (strEq(file, STRDEF("/pg")))
|
||||||
|
Reference in New Issue
Block a user