Skip to content

Commit

Permalink
Merge pull request eclipse-iceoryx#1925 from atirehgram/iox-1919-fix-…
Browse files Browse the repository at this point in the history
…max-group-name-length

iox-eclipse-iceoryx#1919-fix-max-group-name-length
  • Loading branch information
FerdinandSpitzschnueffler authored Mar 7, 2023
2 parents adbed1b + c573c94 commit 0b8052e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/website/release-notes/iceoryx-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
- Can not build iceoryx with gcc 9.4 [\#1871](https://github.com/eclipse-iceoryx/iceoryx/issues/1871)
- Update iceoryx_integrationtest package to use ROS2 Humble [\#1906](https://github.com/eclipse-iceoryx/iceoryx/issues/1906)
- Fix potential memory leak in `iox::stack` [\#1893](https://github.com/eclipse-iceoryx/iceoryx/issues/1893)
- Make `MAX_USER_NAME_LENGTH` and `MAX_GROUP_NAME_LENGTH` platform-dependent [\#1919](https://github.com/eclipse-iceoryx/iceoryx/issues/1919)
- Fix milliseconds in log timestamps [\#1932](https://github.com/eclipse-iceoryx/iceoryx/issues/1932)

**Refactoring:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef IOX_HOOFS_POSIX_WRAPPER_POSIX_ACCESS_RIGHTS_HPP
#define IOX_HOOFS_POSIX_WRAPPER_POSIX_ACCESS_RIGHTS_HPP

#include "iceoryx_platform/platform_settings.hpp"
#include "iceoryx_platform/types.hpp"
#include "iox/optional.hpp"
#include "iox/string.hpp"
Expand All @@ -33,8 +34,7 @@ static constexpr int MaxNumberOfGroups = 888;
class PosixGroup
{
public:
static constexpr uint64_t MAX_GROUP_NAME_LENGTH = 16;
using groupName_t = string<MAX_GROUP_NAME_LENGTH>;
using groupName_t = string<platform::MAX_GROUP_NAME_LENGTH>;
explicit PosixGroup(const gid_t id) noexcept;
explicit PosixGroup(const groupName_t& name) noexcept;

Expand All @@ -60,8 +60,7 @@ class PosixUser
public:
using groupVector_t = vector<PosixGroup, MaxNumberOfGroups>;

static constexpr uint64_t MAX_USER_NAME_LENGTH = 32;
using userName_t = string<MAX_USER_NAME_LENGTH>;
using userName_t = string<platform::MAX_USER_NAME_LENGTH>;

explicit PosixUser(const uid_t id) noexcept;
explicit PosixUser(const userName_t& name) noexcept;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ constexpr uint64_t IOX_UDS_SOCKET_MAX_MESSAGE_SIZE = 4096;
constexpr const char IOX_UDS_SOCKET_PATH_PREFIX[] = "/tmp/";
constexpr const char IOX_LOCK_FILE_PATH_PREFIX[] = "/tmp/";

constexpr uint64_t MAX_USER_NAME_LENGTH = 32;
constexpr uint64_t MAX_GROUP_NAME_LENGTH = 32;

template <typename C, typename... Cargs>
using invoke_result = std::result_of<C(Cargs...)>;
} // namespace platform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ constexpr uint64_t IOX_UDS_SOCKET_MAX_MESSAGE_SIZE = 2048;
constexpr const char IOX_UDS_SOCKET_PATH_PREFIX[] = "/tmp/";
constexpr const char IOX_LOCK_FILE_PATH_PREFIX[] = "/tmp/";

constexpr uint64_t MAX_USER_NAME_LENGTH = 32;
constexpr uint64_t MAX_GROUP_NAME_LENGTH = 16;

template <typename C, typename... Cargs>
using invoke_result = std::invoke_result<C, Cargs...>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ constexpr uint64_t IOX_UDS_SOCKET_MAX_MESSAGE_SIZE = 2048;
constexpr const char IOX_UDS_SOCKET_PATH_PREFIX[] = "/tmp/";
constexpr const char IOX_LOCK_FILE_PATH_PREFIX[] = "/var/lock/";

constexpr uint64_t MAX_USER_NAME_LENGTH = 32;
constexpr uint64_t MAX_GROUP_NAME_LENGTH = 16;

template <typename C, typename... Cargs>
using invoke_result = std::result_of<C(Cargs...)>;
} // namespace platform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ constexpr uint64_t IOX_UDS_SOCKET_MAX_MESSAGE_SIZE = 1024;
constexpr const char IOX_UDS_SOCKET_PATH_PREFIX[] = "/tmp/";
constexpr const char IOX_LOCK_FILE_PATH_PREFIX[] = "/tmp/";

constexpr uint64_t MAX_USER_NAME_LENGTH = 32;
constexpr uint64_t MAX_GROUP_NAME_LENGTH = 16;

template <typename C, typename... Cargs>
using invoke_result = std::invoke_result<C, Cargs...>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ constexpr const char IOX_LOCK_FILE_PATH_PREFIX[] = "C:\\Windows\\Temp\\";
constexpr uint64_t IOX_MAX_FILENAME_LENGTH = 128U;
constexpr uint64_t IOX_MAX_PATH_LENGTH = 255U;

constexpr uint64_t MAX_USER_NAME_LENGTH = 32;
constexpr uint64_t MAX_GROUP_NAME_LENGTH = 16;

template <typename C, typename... Cargs>
using invoke_result = std::invoke_result<C, Cargs...>;

Expand Down

0 comments on commit 0b8052e

Please sign in to comment.