Skip to content

Commit

Permalink
Support failover for domain cache entries
Browse files Browse the repository at this point in the history
  • Loading branch information
connectedway committed Jan 16, 2024
1 parent 7a16036 commit afbef6e
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 8 deletions.
23 changes: 19 additions & 4 deletions DFS.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,21 +104,36 @@ which gets extended into a fqdn using the DNS search suffix.
#### Bootstrap DC

The bootstrap DC informs the OpenFiles DFS stack which DC to contact to
optain information about the Domain. It is required for domain based
DFS.
optain information about the Domain. It is optional for domain based
DFS. There can be more than one bootstrap dc. This is useful for redundant
domain controllers.

It is specified in the OpenFiles.xml file as follows:

```
<smb>
<fqdn>ubuntu.spiritcloud.app</fqdn>
<bootstrap_dc>dc1.spiritcloud.app</bootstrap_dc>
<bootstrap_dc>
<dc>dc1.spiritcloud.app</dc>
<dc>dc2.spiritcloud.app</dc>
</bootstrap_dc>
</smb>
```

The bootstrap_dc should be a FQDN to the DC, or it can be a shortened
The dc should be a FQDN to the DC, or it can be a shortened
name which will be extended into a FQDN by the DNS search suffix.

If a bootstrap_dcs are not specified in the configuration file, OpenFiles will
attempt to locate the DCs by querying for DNS SRV configuration records.
There may be multiple SRV resolutions and can provide redundnancy as well.

If using SRV DNS resolution, the following SRV records must be registered
in the DNS servers.

```
_kerberos._dc
```

### Dynamic Runtime Configuration

If persistent configuration is not being used,
Expand Down
2 changes: 2 additions & 0 deletions configs/linux-smbfs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ set(OFC_DEFAULT_NAME "localhost" CACHE STRING "Default system name")
set(OFC_DEFAULT_SCOPE "" CACHE STRING "Default system scope")
set(OFC_DEFAULT_DESCR "Open Files" CACHE STRING "Default system description")
set(OFC_DEFAULT_DOMAIN "WORKGROUP" CACHE STRING "Default system domain")
set(OFC_LOG_DEFAULT "1" CACHE STRING "Default Log Level")
set(OFC_LOG_CONSOLE "0" CACHE STRING "Log to Console, 1=yes, 0=no")
option(INIT_ON_LOAD "Initialize libraries on load" ON)
set(OFC_LOAD "__attribute__((constructor))" CACHE STRING "Compiler attribute for constructor")
set(OFC_UNLOAD "__attribute__((destructor))" CACHE STRING "Compile attribute for destructor")
Expand Down
4 changes: 4 additions & 0 deletions configs/linux_debug.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<of_core version="0.0">
<logging>
<console>yes</console>
<level>2</level>
</logging>
<devicename>localhost</devicename>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<description>Open Files</description>
Expand Down
2 changes: 2 additions & 0 deletions include/ofc/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
#cmakedefine OF_GNUTLS
#cmakedefine OF_MBEDTLS
#cmakedefine OF_ENCRYPTION
#define OFC_LOG_CONSOLE @OFC_LOG_CONSOLE@
#define OFC_LOG_DEFAULT @OFC_LOG_DEFAULT@
#define OFC_MAX_HANDLE16 @OFC_MAX_HANDLE16@
#define OFC_MAX_MAPS @OFC_MAX_MAPS@
#define OFC_TRACE_LEN @OFC_TRACE_LEN@
Expand Down
2 changes: 1 addition & 1 deletion of_core
2 changes: 1 addition & 1 deletion of_core_linux
Submodule of_core_linux updated 1 files
+5 −6 src/net_linux.c
2 changes: 1 addition & 1 deletion of_smb
Submodule of_smb updated from e0927a to e1fcdc
2 changes: 1 addition & 1 deletion of_smb_fs
Submodule of_smb_fs updated from 7e7e2b to 12aea8

0 comments on commit afbef6e

Please sign in to comment.