aboutsummaryrefslogtreecommitdiffstats
path: root/src/i_insert.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/i_insert.go')
-rw-r--r--src/i_insert.go15
1 files changed, 15 insertions, 0 deletions
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