WIP added OU field

pull/81/head
parent c3dac217d8
commit d9a071d8f1
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -461,16 +461,18 @@ void on_domain_connect(GtkWidget *, dictionary *dict){
char *password = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry));
char *kerberos = (char*)gtk_entry_get_text(GTK_ENTRY(window->KerberosServerEntry));
char *dns = (char*)gtk_entry_get_text(GTK_ENTRY(window->DNSEntry));
char *ou = (char*)gtk_entry_get_text(GTK_ENTRY(window->OuEntry));
char *client = NULL;
if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->ClientCombo))){
client = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->ClientCombo));
}
char *final = yon_char_unite(!yon_char_is_empty(kerberos)?kerberos_addition_command(kerberos):"",!yon_char_is_empty(kerberos)?" ":"",!yon_char_is_empty(dns)?dns_addition_command(dns):"",!yon_char_is_empty(dns)?" ":"",!yon_char_is_empty(client)?client_addition_command(client):"",!yon_char_is_empty(client)?" ":"",NULL);
yon_debug_output("%s\n",domain_connect_command(adress,login,password,final));
char *command = domain_connect_command(adress,login,password,final,ou);
yon_debug_output("%s\n",command);
domain_info_window *dialog = yon_information_window_new();
gtk_label_set_text(GTK_LABEL(dialog->HeadLabel),DOMAIN_CONNECTING_LABEL);
gtk_window_set_title(GTK_WINDOW(dialog->Window),DOMAIN_CONNECTING_LABEL);
yon_terminal_integrated_start(dialog->ExecuteTerminal,domain_connect_command(adress,login,password,final));
yon_terminal_integrated_start(dialog->ExecuteTerminal,command);
dictionary *dc = NULL;
yon_dictionary_add_or_create_if_exists_with_data(dc,"widgets",widgets);
yon_dictionary_add_or_create_if_exists_with_data(dc,"window",window->Window);
@ -568,7 +570,9 @@ connection_window *yon_connection_window_new(){
window->SaveButton = yon_gtk_builder_get_widget(builder,"SaveButton");
window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
window->CheckButton = yon_gtk_builder_get_widget(builder,"CheckButton");
window->OuEntry = yon_gtk_builder_get_widget(builder,"OuEntry");
window->list = GTK_LIST_STORE(gtk_builder_get_object(builder,"liststore1"));
yon_gtk_entry_block_symbols(GTK_ENTRY(window->OuEntry),"!\"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~.");
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_signal_connect(G_OBJECT(window->StatusEntry),"clicked",G_CALLBACK(on_status_clicked),window);
g_signal_connect(G_OBJECT(window->CheckButton),"clicked",G_CALLBACK(yon_update_thread),window);

@ -65,7 +65,7 @@
#define check_domain_access_command(targeet) yon_char_append("adcli info --domain ",target)
#define get_domain_info_command "ubdomain-client list "
#define domains_seek_command "ubdomain-client discover"
#define domain_connect_command(target,user,password, addition) yon_char_unite("ubdomain-client join",!yon_char_is_empty(user)?" --user \"":"",!yon_char_is_empty(user)?user:"",!yon_char_is_empty(user)?"\"":"",!yon_char_is_empty(password)?" --password \"":"",!yon_char_is_empty(password)?password:"",!yon_char_is_empty(password)?"\"":""," --domain \"",target,"\"", addition,NULL)
#define domain_connect_command(target,user,password, addition,ou) yon_char_unite("ubconfig set [network] DOMAIN[ou]='",!yon_char_is_empty(ou)?ou:"","';"," ubdomain-client join",!yon_char_is_empty(user)?" --user \"":"",!yon_char_is_empty(user)?user:"",!yon_char_is_empty(user)?"\"":"",!yon_char_is_empty(password)?" --password \"":"",!yon_char_is_empty(password)?password:"",!yon_char_is_empty(password)?"\"":""," --domain \"",target,"\"", addition,NULL)
#define domain_disconnect_command(target,user,password) yon_char_unite("ubdomain-client leave",!yon_char_is_empty(user)?" --user \"":"",!yon_char_is_empty(user)?user:"",!yon_char_is_empty(user)?"\"":"",!yon_char_is_empty(password)?" --password \"":"",!yon_char_is_empty(password)?password:"",!yon_char_is_empty(password)?"\"":""," --domain \"",target,"\"",NULL)
#define kerberos_addition_command(target) yon_char_unite(" --domain_server \"",target,"\"",NULL)
#define dns_addition_command(target) yon_char_unite(" --dns \"",target,"\"",NULL)
@ -168,6 +168,8 @@ typedef struct {
GtkWidget *StatusBox;
GtkWidget *HeadLabel;
GtkWidget *OuEntry;
GtkWidget *CancelButton;
GtkWidget *SaveButton;
GtkWidget *AdressEntry;

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<!-- Generated with glade 3.40.0 -->
<interface domain="ubl-settings-system">
<requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubl-settings-system.css -->
@ -306,6 +306,42 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">OU, Organizational Unit:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="OuEntry">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tooltip-text" translatable="yes">The name of the OU in which we want to create the computer account in the domain. If the account already exists, it will be updated. Example: ubhosts\units</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@ -346,7 +382,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
<property name="position">3</property>
</packing>
</child>
<child>

Loading…
Cancel
Save