Commit f4044b2f authored by jan.koester's avatar jan.koester
Browse files

test

parent b29b0ca2
Loading
Loading
Loading
Loading
+8 −0
Changes for CMakeLists.txt: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ add_executable(sharedd
    src/rpc.cpp
    src/files.cpp
    src/iscsi.cpp
    src/mdns.cpp
)
target_include_directories(sharedd PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(SHAREDD_ADCONNECT_SOCKET "/run/adconnect.sock" CACHE FILEPATH "adconnectd's socket, for Kerberos logins")
@@ -54,3 +55,10 @@ install(DIRECTORY include/sharedd DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES dist/sharedd.yaml DESTINATION /etc/sharedd PERMISSIONS OWNER_READ OWNER_WRITE)
set(SHAREDD_UNITDIR "/etc/syslite/services" CACHE PATH "syslite unit directory")
install(FILES dist/sharedd.service DESTINATION ${SHAREDD_UNITDIR})

include(CTest)
if(BUILD_TESTING)
    add_executable(mdns_test test/mdns_test.cpp src/mdns.cpp)
    target_include_directories(mdns_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
    add_test(NAME mdns_test COMMAND mdns_test)
endif()
+2 −0
Changes for dist/sharedd.yaml: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@ sharedd:
    enabled: true             # NFSv4 only (port 2049)
    threads: 8
    root: /                   # NFSv4 root, clients see it as "/" (not on overlayfs)
  mdns:
    enabled: true             # announce SMB and the NFS shares by multicast DNS (port 5353)
  # shares:
  #   - name: data
  #     path: /srv/data
+2 −1
Changes for include/sharedd/api.h: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -52,7 +52,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * min_protocol, max_protocol (SMB2_10 SMB3_00 SMB3_02 SMB3_11), signing
 * (disabled|enabled|auto|mandatory), map_to_guest (never|bad_user),
 * guest_account, nfs (yes|no), nfs_threads, nfs_root (the directory NFSv4
 * clients see as "/"; NFS shares have to be below it), iscsi (yes|no),
 * clients see as "/"; NFS shares have to be below it), mdns (yes|no: the
 * shares announced by multicast DNS), iscsi (yes|no),
 * iscsi_base_name (targets are <base>:<name>), iscsi_portal (repeated:
 * address:port or [IPv6]:port to listen on).
 *
+2 −0
Changes for src/config.cpp: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -539,6 +539,7 @@ Config loadConfig(const std::string &path) {
        readInt(conf, r + "/nfs/threads", threads);
        s.nfsThreads = (int)threads;
        readString(conf, r + "/nfs/root", s.nfsRoot);
        readBool(conf, r + "/mdns/enabled", s.mdns);

        for (int i = 0;; ++i) {
            std::string p = r + "/shares/" + std::to_string(i);
@@ -614,6 +615,7 @@ void saveConfig(const std::string &path, const Config &cfg) {
        set(conf, r + "/nfs/enabled", yesNo(s.nfs));
        set(conf, r + "/nfs/threads", std::to_string(s.nfsThreads));
        set(conf, r + "/nfs/root", s.nfsRoot);
        set(conf, r + "/mdns/enabled", yesNo(s.mdns));
        for (size_t i = 0; i < cfg.shares.size(); ++i) {
            const Share &sh = cfg.shares[i];
            std::string p = r + "/shares/" + std::to_string(i);
+1 −0
Changes for src/config.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ struct Settings {
    std::string guestAccount = "nobody";
    bool nfs = true;
    int nfsThreads = 8;
    bool mdns = true;                  // the shares announced by multicast DNS (mdns.h)
    // the NFSv4 root: clients see this directory as "/" (with "/srv",
    // /srv/data is server:/data); NFS shares have to be below it. It must
    // be on an exportable filesystem -- not overlayfs, so on the live
Loading