aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-04-11 20:20:20 +0200
committerJoe <rbo@gmx.us>2024-04-11 20:20:20 +0200
commitd67728a19238c373dff3c6217bec1709bb4846b7 (patch)
tree52efaa1b0e8e51c8a96c170ce4e8de2366c7a72c
parentso good (diff)
downloadhardflip-d67728a19238c373dff3c6217bec1709bb4846b7.tar.gz
hardflip-d67728a19238c373dff3c6217bec1709bb4846b7.tar.bz2
hardflip-d67728a19238c373dff3c6217bec1709bb4846b7.tar.xz
hardflip-d67728a19238c373dff3c6217bec1709bb4846b7.tar.zst
hardflip-d67728a19238c373dff3c6217bec1709bb4846b7.zip
cool
-rw-r--r--src/c_defs.go3
-rw-r--r--src/i_insert.go15
2 files changed, 17 insertions, 1 deletions
diff --git a/src/c_defs.go b/src/c_defs.go
index d8933e6..d899720 100644
--- a/src/c_defs.go
+++ b/src/c_defs.go
@@ -43,7 +43,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* hardflip: src/c_defs.go
- * Wed Feb 21 19:40:07 2024
+ * Thu Apr 11 17:55:54 2024
* Joe
*
* constants
@@ -127,6 +127,7 @@ const (
INS_RDP_USER
INS_RDP_PASS
INS_RDP_FILE
+ INS_RDP_QUALITY
// TODO: here
INS_RDP_OK
)
diff --git a/src/i_insert.go b/src/i_insert.go
index d2c7c20..dac18a6 100644
--- a/src/i_insert.go
+++ b/src/i_insert.go
@@ -107,8 +107,23 @@ func i_insert_abs_files(insert *HostNode) {
}
}
+func i_insert_default_users(insert *HostNode) {
+ switch insert.Protocol {
+ case PROTOCOL_SSH:
+ if len(insert.User) == 0 {
+ insert.User = "root"
+ }
+ case PROTOCOL_RDP:
+ if len(insert.User) == 0 {
+ insert.User = "Administrator"
+ }
+ default: return
+ }
+}
+
func i_insert_host(data *HardData, insert *HostNode) {
i_insert_abs_files(insert)
+ i_insert_default_users(insert)
filename := i_insert_format_filename(insert.Name,
data.data_dir + insert.parent.path())
insert.filename = filename