[Bug 423136] New: Unused broken function net_ask_hostname in linuxrc (net.c )
https://bugzilla.novell.com/show_bug.cgi?id=423136 Summary: Unused broken function net_ask_hostname in linuxrc (net.c) Product: openSUSE 11.0 Version: Final Platform: All OS/Version: openSUSE 11.0 Status: NEW Severity: Minor Priority: P5 - None Component: Installation AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: arthursv@linux.vnet.ibm.com QAContact: jsrain@novell.com Found By: --- In the linuxrc rpm source package there is a net.c file, that deals with all the network configuration involved in the initial step of the installation. On the file net.c there is this function: void net_ask_hostname() { char* dot; int win_old = config.win; if(!config.net.realhostname || !config.net.domain) { if(!config.win) util_disp_init(); repeat: dia_input2(txt_get(TXT_HOSTNAME), &config.net.realhostname, 20, 0); dot=strstr(config.net.realhostname,"."); /* find first dot */ if(!dot) { dia_message(txt_get(TXT_INVALID_FQHOSTNAME), MSGTYPE_ERROR); goto repeat; } str_copy(&config.net.domain,dot+1); /* copy domain part */ *dot=0; /* cut off domain */ if(config.win && !win_old) util_disp_done(); } } Running a find . | xargs grep 'net_ask_hostname' in linuxrc, there is only one reference to it in line 2385 of net.c: /net.c: //net_ask_hostname(); /* not sure if this is the best place; ssh login does not work if the hostname is not correct */ As you can see it is commented. But not only this is dead code, the code is also broken! I tried running it in static network configuration, if you type the FQHN as expected it works fine. If you type the ESCAPE character it crashes linuxrc: Automatic configuration via DHCP? 1) Yes 2) No
2
Enter your IP address> 9.8.xxx,xxx //(static IP hidden, security purpose) Enter your netmask. For a normal class C network, this is usually 255.255.255.0 [255.255.255.0]> If you need a gateway to reach the server, enter the IP address of the gateway. If you do not need a gateway, enter your own IP address [9.8.xxx.xxx]> 9.8.xxx.xxx //(static IP hidden, security purpose) Fully qualified hostname> ^[ udevd[976]: init_udevd_socket: bind failed: Address already in use udevd[976]: main: error initializing udevd socket: Illegal seek *** Sorry, linuxrc crashed at address 0x0fe9c284. Linuxrc has been restarted in manual mode.
Linuxrc v2.0.79 (Kernel 2.6.16.60-0.21-ppc64) <<<
Main Menu 1) Settings 2) System Information 3) Kernel Modules (Hardware Drivers) 4) Start Installation or System 5) Verify Installation CD-ROM/DVD 6) Eject CD 7) Exit or Reboot 8) Power off
This is the reason I started this bug as "MINOR", because if someone tries to use this code, we will have a bug ahead from it. I ran this on a powerpc, but I believe it to be cross-platform since the issue happens on udev. I simply recommend deleting this function, but if not, fixing it. Thank you, -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=423136
Robert Vojcik
https://bugzilla.novell.com/show_bug.cgi?id=423136
User snwint@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=423136#c1
Steffen Winterfeldt
participants (1)
-
bugzilla_noreply@novell.com