Re: [DNG] netman GIT project

2015-09-09 Thread Edward Bartolo
from > the task at hand. Personally, I am not happy to even see his name via your > proxy on this list and don't understand why you're playing with him . . . > > golinux > > > > On Wed, 9/9/15, Edward Bartolo <edb...@gmail.com&

Re: [DNG] netman GIT project

2015-09-09 Thread Edward Bartolo
Hi Daniel, Sometimes I send a message twice, but it is not out of exasperation of being trolled, but to make certain my email goes to dng@lists.dyne.org. Like a well trained hunter's hound, I have immediately smelt the trollish attitude, but I wanted to act like someone who is ready to listen to

Re: [DNG] netman GIT project

2015-09-09 Thread Edward Bartolo
. Personally, I am not happy to even see his name via >> your >> proxy on this list and don't understand why you're playing with him . . . >> >> golinux >> >> >> >> On Wed, 9/9/15, Edward Bartolo <edb...@gmail.com> wrot

Re: [DNG] netman GIT project

2015-09-08 Thread Edward Bartolo
fsmithred has successfully used netman to connect to both wired and wireless network interfaces. I am of the opinion this shows the time has come for me to start thinking about a post installation script, so that, the necessary edits to /etc/network/interfaces or /etc/network/interfaces.d are done

Re: [DNG] netman GIT project

2015-09-08 Thread aitor_czr
Hi Edward, Don't change the name of the main funtion. In order to distinguish between ifup and ifdown, you can use one of the arguments, for example argv[1] (the first one *int argc* is the number of arguments in the command line (+1) included itself) . Aitor. El 08/09/15 a las 21:40,

Re: [DNG] netman GIT project

2015-09-08 Thread Edward Bartolo
Quote: << Maybe you could get away with setting only one capability on the back end instead of handing it full root privileges. Maybe there is a group that has special privileges to run the necessary binaries? Then you could sgid your back end to that group id, severely limiting the damage any

Re: [DNG] netman GIT project

2015-09-08 Thread Edward Bartolo
Hi all, I think, a simple way to avoid the backend having to call external programs like ifup and ifdown, is to use code belonging to these programs as it they were functions. This means, their code would be used like this: Suppose int main(int argc, char * argv[]) is the main function for ifup.

Re: [DNG] netman GIT project

2015-09-08 Thread Rainer Weikusat
Edward Bartolo writes: > Actually, you can do away with using a root SUID for backend as that > was initially how netman was designed. However, there were complaints > that I was adding an extra dependency which simply was a dependency on > sudo being installed. Moreover, my

Re: [DNG] netman GIT project

2015-09-08 Thread Hendrik Boom
On Tue, Sep 08, 2015 at 11:53:33PM +0100, KatolaZ wrote: > On Tue, Sep 08, 2015 at 09:40:12PM +0200, Edward Bartolo wrote: > > Hi all, > > > > I think, a simple way to avoid the backend having to call external > > programs like ifup and ifdown, is to use code belonging to these > > programs as it

Re: [DNG] netman GIT project

2015-09-08 Thread KatolaZ
On Tue, Sep 08, 2015 at 09:40:12PM +0200, Edward Bartolo wrote: > Hi all, > > I think, a simple way to avoid the backend having to call external > programs like ifup and ifdown, is to use code belonging to these > programs as it they were functions. This means, their code would be > used like

Re: [DNG] netman GIT project

2015-09-08 Thread Edward Bartolo
Actually, you can do away with using a root SUID for backend as that was initially how netman was designed. However, there were complaints that I was adding an extra dependency which simply was a dependency on sudo being installed. Moreover, my initial proposal that worked, used sudo in a way to

Re: [DNG] netman GIT project

2015-09-08 Thread Edward Bartolo
Hi all, Having read your replies, I think, the best option is NOT to change netman's backend as suggested by Tobias Hunger. This means, I will heed the advice of Rainer Weikusat, KatolaZ and Hendrik Boom. Regarding the advice from aitor_czr, I wish to thank aitor, notwithstanding I will not

Re: [DNG] netman GIT project

2015-09-05 Thread aitor_czr
Pushed libpqxx++ to GitLab: https://gitlab.com/aitor_czr/libpqxx/tree/master It uses command line parameters :) Aitor. El 04/09/15 a las 20:44, Edward Bartolo escribió: I will use command line parameters for the GUI frontend so that it may be started to automatically scan for available wifis

Re: [DNG] netman GIT project

2015-09-02 Thread Edward Bartolo
Hi, This is a link to a post by keithpeter on forums.debian.net which looks encouraging notwithstanding the hard-to-workaround bugs that I am facing now. http://forums.debian.net/viewtopic.php?f=3=124343=591309#p591124 Thanks, keithpeter and all who boost my motivation to finish this project.

Re: [DNG] netman GIT project

2015-09-01 Thread aitor_czr
Hi Edward, Here is the code of my libpqxx++ project: http://gnuinos.org/libpqxx++/ (Now i can't access to any git repository in my gitlab account; apparently it's in maintenance). It is a small project, and you can analyze the debian branch (debian/rules, etc...). The separation: libpqxx

Re: [DNG] netman GIT project

2015-09-01 Thread Edward Bartolo
Hi Aitor, As soon as I have time I will have a look at the code. Regarding learning to use git, I learnt to push my commits and do git pulls to synchronize my sources with those of the repository. I took note of all the git commands used together with the sequence in which they were issued.

Re: [DNG] netman GIT project

2015-08-31 Thread Jaromil
On Mon, 31 Aug 2015, Edward Bartolo wrote: > The only way that does not allow multiple similar threads is to allow > the GUI to become momentarily unresponsive. how about first changing the UI with a "processing..." sign and then make it unresponsive? then it would say at least that

Re: [DNG] netman GIT project

2015-08-31 Thread Rainer Weikusat
Edward Bartolo writes: > I tried several ways to use grey-out buttons but there is a bug or > something that is preventing me. The only way I found is > multi-threading or simply leaving the main thread to wait for the > backend to finish its job until it becomes available to

Re: [DNG] netman GIT project

2015-08-29 Thread Edward Bartolo
...@gmail.com wrote: Subject: Re: [DNG] netman GIT project To: Steve Litt sl...@troubleshooters.com Cc: dng dng@lists.dyne.org Date: Friday, August 28, 2015, 2:35 PM But now, it looks like I succeeded with this commit: --- commit

Re: [DNG] netman GIT project

2015-08-28 Thread Edward Bartolo
Found a call to calloc() without a matching call to free() in core_functions.c i) eth0, wlan0 can be upped and downed from GUI ii) eth0 configuration cannot be edited from GUI iii) wifi configuration can be edited from GUI iv) wifi hotspot scanning works v) listing of configured wifis and eth0

Re: [DNG] netman GIT project

2015-08-28 Thread Edward Bartolo
This is exasperating! Git is refusing my commits telling me everything is up to date! This is effectively locking me out of development notwithstanding that I spent hours upon hours developing. This puts me down. :((( Edward On 28/08/2015, Edward Bartolo edb...@gmail.com wrote: Found a call

Re: [DNG] netman GIT project

2015-08-28 Thread Edward Bartolo
Suppose I changed backend.c core_functions.c core_functions.h, what would the command be? Edward On 28/08/2015, Urban Wallasch urban.walla...@freenet.de wrote: On Fri, 28 Aug 2015 18:11:22 +0100, Edward Bartolo wrote: This is exasperating! Git is refusing my commits telling me everything

Re: [DNG] netman GIT project

2015-08-28 Thread Steve Litt
On Fri, 28 Aug 2015 18:11:22 +0100 Edward Bartolo edb...@gmail.com wrote: This is exasperating! Git is refusing my commits telling me everything is up to date! This is effectively locking me out of development notwithstanding that I spent hours upon hours developing. This puts me down.

Re: [DNG] netman GIT project

2015-08-28 Thread Jaromil
many are the ways of the artisans and we shall respect them all lets put it white on black: Devuan will not lure upstream into its git but certainly we are honored to share that infrastructure with this fine campfire for me git has been a great thing. but then I was already using CVS and svn

Re: [DNG] netman GIT project

2015-08-28 Thread KatolaZ
On Sat, Aug 29, 2015 at 12:00:28AM +0200, Jaromil wrote: many are the ways of the artisans and we shall respect them all lets put it white on black: Devuan will not lure upstream into its git but certainly we are honored to share that infrastructure with this fine campfire for me

Re: [DNG] netman GIT project

2015-08-28 Thread Irrwahn
Assuming you are in the backend_src directory of the project: # git add src/backend.c src/core_functions.c include/core_functions.h # git commit -m my fancy commit message (Hope I got the subdirectory names right, did this without actually checking.) -- Irrwahn On Fri, 28 Aug 2015 18:32:26

Re: [DNG] netman GIT project

2015-08-28 Thread Edward Bartolo
Quote: IMHO in the beginning every project should be one person, or at the most 3. Others can make suggestions, but the guys doing the dev should pick which suggestions go in. Later, when the project becomes stable, THEN put it in Git where everyone can have their way with it. In fact,

Re: [DNG] netman GIT project

2015-08-27 Thread Edward Bartolo
There are no infinite loops in the backend, therefore it will do what it is requested and terminate. The backend is run every time the frontend needs the former's services. On every call, the backend terminates, otherwise we would need some form of messaging between applications, and probably,

Re: [DNG] netman GIT project

2015-08-27 Thread Edward Bartolo
I added another function to core_functions.c. It attempts to connect to eth0 but for some weird reason, probably a bug not from our part, it is failing. The function is: int connectWired(const char ethx) And the error is: (passed command to execl is ifup eth0) This command should be called as

Re: [DNG] netman GIT project

2015-08-27 Thread Steve Litt
On Thu, 27 Aug 2015 15:40:49 +0100 Edward Bartolo edb...@gmail.com wrote: I added another function to core_functions.c. It attempts to connect to eth0 but for some weird reason, probably a bug not from our part, it is failing. The function is: int connectWired(const char ethx) And the

Re: [DNG] netman GIT project

2015-08-27 Thread tilt!
Usage: execl(full_pathname, runas, arg1, arg2, ..., NULL) in this case: full_pathname = /bin/ifup runas = ifup arg1 = eth0 Regards, T. Am 27. August 2015 16:40:49 MESZ, schrieb Edward Bartolo edb...@gmail.com: I added another function to core_functions.c. It attempts to connect to eth0 but

Re: [DNG] netman GIT project

2015-08-27 Thread Edward Bartolo
It worked. Now, I must find a way to determine whether we can communicate with a router. Found that also. ip a | grep wlan0 With wifi switched on and connection active: state UP With wifi turned off and connection still active: state DOWN That is what I need. Edward On 27/08/2015, Steve

Re: [DNG] netman GIT project

2015-08-27 Thread Edward Bartolo
Also successfully detected multiple simultaneously active connections from Lazarus code. The next step will be to implement network connection identification in C code. After that, I will do my next commit to git.devuan.org Automatic searching for Wifi hotspots probably will need a separate

Re: [DNG] netman GIT project

2015-08-27 Thread Edward Bartolo
I am trying to write a C function to start the wired network interfaces eth0, eth1 up to eth2. This is how I wrote it, but I would like your opinion about it especially where I should declare err. The attachment is best viewed with medit with a tab space of 2. On 27/08/2015, Edward Bartolo

Re: [DNG] netman GIT project

2015-08-27 Thread Edward Bartolo
I don't think it is necessary to daemonise the backend as connection to and disconnecting from a network is not something that is done continuously. Therefore, in my humble opinion, running the backend on request seems to be the best approach. This also avoids additional complexity of requiring a

Re: [DNG] netman GIT project

2015-08-26 Thread Steve Litt
On Wed, 26 Aug 2015 05:39:36 +0100 Edward Bartolo edb...@gmail.com wrote: I am being suggested to do away with sudo dependency to run the backend with root privileges. Wait a minute. Isn't the back end a daemon run at boot time? As such, why not run it as root, given that wpa_supplicant

Re: [DNG] netman GIT project

2015-08-26 Thread Isaac Dunham
On Wed, Aug 26, 2015 at 02:27:57PM +0200, tilt! wrote: On 08/26/2015 01:36 PM, Irrwahn wrote: [...] Or, even better, you could easily pass the IF name as an additional parameter to the backend (and possily even use it as additional component to construct the interface file names). An easy

Re: [DNG] netman GIT project

2015-08-26 Thread Irrwahn
On Wed, 26 Aug 2015 02:24:05 -0400, Steve Litt wrote: On Wed, 26 Aug 2015 05:39:36 +0100 Edward Bartolo edb...@gmail.com wrote: I am being suggested to do away with sudo dependency to run the backend with root privileges. Wait a minute. Isn't the back end a daemon run at boot time? As

Re: [DNG] netman GIT project

2015-08-26 Thread tilt!
On 08/26/2015 02:27 PM, tilt! wrote: [...], which is based on https://gist.github.com/javiermon/43a0b9e1c07abd4b13df Sry, T. ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Re: [DNG] netman GIT project

2015-08-26 Thread Irrwahn
On Wed, 26 Aug 2015 05:39:36 +0100, Edward Bartolo wrote: snip Today, if my concentration permits, I will try to add support for eth0 and add code to display the device nodes in the list box. I can also add support for eth1 and wlan1, but this in my opinion is an overkill as mobile computers

Re: [DNG] netman GIT project

2015-08-26 Thread tilt!
On 08/26/2015 01:36 PM, Irrwahn wrote: [...] Or, even better, you could easily pass the IF name as an additional parameter to the backend (and possily even use it as additional component to construct the interface file names). An easy way to obtain a list of interface names on Linux is: awk

Re: [DNG] netman GIT project

2015-08-26 Thread aitor_czr
Hi Steve, Connman runs without sudo privilegies, and it doesn't require any session-manager like slim, lightdm, etc... Aitor. On 26/08/15 14:00, Steve Litt sl...@troubleshooters.com wrote: On Wed, 26 Aug 2015 05:39:36 +0100 Edward Bartoloedb...@gmail.com wrote: I am being suggested to do

Re: [DNG] netman GIT project

2015-08-25 Thread karl
Tilt!: i wonder if we ever get to see such SSIDs from iwlist anyway - how is it supposed to print SSIDs that contain the zerobyte ... iwlib.c line 989..995: /* Is it a non-ASCII character ??? */ if(isescape || !isascii(*s) || iscntrl(*s)) { /* Escape */

Re: [DNG] netman GIT project

2015-08-25 Thread Edward Bartolo
Rethinking about it, there is no need to use the ESSID in the table. A table like the following would do the job neatly, in my humble opinion. ESSIDs are already saved in the interfaces files, so a table like the following is enough: 1 my little wifi at home 2 my wifi at work 3

Re: [DNG] netman GIT project

2015-08-25 Thread Steve Litt
On Tue, 25 Aug 2015 17:06:52 +0100 Edward Bartolo edb...@gmail.com wrote: Rethinking about it, there is no need to use the ESSID in the table. A table like the following would do the job neatly, in my humble opinion. ESSIDs are already saved in the interfaces files, so a table like the

Re: [DNG] netman GIT project

2015-08-25 Thread Irrwahn
On Tue, 25 Aug 2015 19:24:17 +0200 (CEST), Karl wrote: Tilt!: i wonder if we ever get to see such SSIDs from iwlist anyway - how is it supposed to print SSIDs that contain the zerobyte ... iwlib.c line 989..995: /* Is it a non-ASCII character ??? */ if(isescape || !isascii(*s)

Re: [DNG] netman GIT project

2015-08-25 Thread Rainer Weikusat
Irrwahn irrw...@freenet.de writes: On Tue, 25 Aug 2015 13:49:39 +0100, Rainer Weikusat wrote: tilt! t...@linuxfoo.de writes: On 08/25/2015 02:09 PM, Rainer Weikusat wrote: Considering that this enforces some kind of 'bastard URL-encoding' (using + as prefix instead of %) for all other bytes,

Re: [DNG] netman GIT project

2015-08-25 Thread Edward Bartolo
For the attention of the packager: I found a way of using a pascal compiler command to compile the Lazarus project without having Lazarus running. The procedure is as follows: cd to-directory-containing-sources Issue this weirdo-of-a-command: fpc-2.6.4 -MObjFPC -Scghi -O1 -Tlinux -g -gl

Re: [DNG] netman GIT project

2015-08-25 Thread tilt!
Am 25. August 2015 15:52:15 MESZ, As mentioned above: if there is any real issue with the code at all, it is the fact that null characters (zero bytes) are not handled correctly by the code. But that's a feat it has in common with many consumer WiFi appliance configuration utilities (and a

Re: [DNG] netman GIT project

2015-08-25 Thread Edward Bartolo
OOOps: type TDynamicRecord = record RecordTypeID: integer; ActualRecord: Pointer; end; should be: type TDynamicRecord = record RecordTypeID: TRecordTypeID; ActualRecord: Pointer; end; On 25/08/2015, Edward Bartolo edb...@gmail.com wrote: Quote: Rainer

Re: [DNG] netman GIT project

2015-08-25 Thread Irrwahn
On Tue, 25 Aug 2015 15:24:01 +0100, Rainer Weikusat wrote: Irrwahn irrw...@freenet.de writes: snip It is totally sensible to break down the character set to something that is more or less guaranteed to be valid for building names in any file system currently in use on this planet. This

Re: [DNG] netman GIT project

2015-08-25 Thread Edward Bartolo
We can easily avoid having to encode ESSIDs by creating a file containing a texual lookup table as the following, but since the project is already functional, it looks like rebuilding a house that is already habitable. essid1my little wifi at home essid2oops, wifi at my partner's! essid3

Re: [DNG] netman GIT project

2015-08-25 Thread Edward Bartolo
Quote: Rainer Wrote: A C string of length 0 is just a \000. A NULL pointer is not a string. A unallocated variable, be it anything from a simple basic variable like an int*, to the most complex of struct variables, is simply a placeholder for a memory address, or a pointer devoid of space,

Re: [DNG] netman GIT project

2015-08-25 Thread tilt!
Am 25. August 2015 16:52:41 MESZ, schrieb Edward Bartolo edb...@gmail.com: We can easily avoid having to encode ESSIDs by creating a file containing a texual lookup table as the following, but since the project is already functional, it looks like rebuilding a house that is already habitable.

Re: [DNG] netman GIT project

2015-08-25 Thread Irrwahn
On Tue, 25 Aug 2015 17:02:55 +0200, Tilt! wrote: Am 25. August 2015 16:52:41 MESZ, schrieb Edward Bartolo edb...@gmail.com: We can easily avoid having to encode ESSIDs by creating a file containing a texual lookup table as the following, but since the project is already functional, it

Re: [DNG] netman GIT project

2015-08-25 Thread Rainer Weikusat
Irrwahn irrw...@freenet.de writes: On Tue, 25 Aug 2015 17:02:55 +0200, Tilt! wrote: Am 25. August 2015 16:52:41 MESZ, schrieb Edward Bartolo edb...@gmail.com: We can easily avoid having to encode ESSIDs by creating a file containing a texual lookup table as the following, but since the

Re: [DNG] netman GIT project

2015-08-25 Thread Steve Litt
On Tue, 25 Aug 2015 17:06:52 +0100 Edward Bartolo edb...@gmail.com wrote: Rethinking about it, there is no need to use the ESSID in the table. A table like the following would do the job neatly, in my humble opinion. ESSIDs are already saved in the interfaces files, so a table like the

Re: [DNG] netman GIT project

2015-08-25 Thread karl
Irrwahn: On Tue, 25 Aug 2015 19:24:17 +0200 (CEST), Karl wrote: Tilt!: i wonder if we ever get to see such SSIDs from iwlist anyway - how is it supposed to print SSIDs that contain the zerobyte ... iwlib.c line 989..995: /* Is it a non-ASCII character ??? */ if(isescape

Re: [DNG] netman GIT project

2015-08-25 Thread Irrwahn
On Tue, 25 Aug 2015 21:16:08 +0100, Edward Bartolo wrote: On 25/08/2015, Irrwahn irrw...@freenet.de wrote: On Tue, 25 Aug 2015 20:20:20 +0200 (CEST), Karl wrote: Irrwahn: On Tue, 25 Aug 2015 19:24:17 +0200 (CEST), Karl wrote: Tilt!: i wonder if we ever get to see such SSIDs from iwlist

Re: [DNG] netman GIT project

2015-08-25 Thread Edward Bartolo
Since eth0 is usually configured in /etc/network/interfaces, and a normal installation creates a functioning interfaces file, I think, it is better to leave what works unchanged. The backend can be modified a little to call ifup eth0, and if more than one ethX exist, which is highly improbable on

Re: [DNG] netman GIT project

2015-08-25 Thread Edward Bartolo
Hi Tilman Kranz, What should I do? Could give me more details as to what I should do, please? Edward On 25/08/2015, tilt! t...@linuxfoo.de wrote: Hi Edward, On 08/25/2015 12:51 PM, Edward Bartolo wrote: [...] Please accept merge request #1 cleanup of backend binaries. I forgot to add

Re: [DNG] netman GIT project

2015-08-25 Thread Rainer Weikusat
tilt! t...@linuxfoo.de writes: Hi Edward, On 08/25/2015 12:51 PM, Edward Bartolo wrote: [...] Please accept merge request #1 cleanup of backend binaries. Two random remarks: , | size_t essid_safe_strlen(uint8_t * bytes) | { | size_t result; | | if(!bytes) |

Re: [DNG] netman GIT project

2015-08-25 Thread Isaac Dunham
On Tue, Aug 25, 2015 at 10:35:21PM +0200, Irrwahn wrote: On Tue, 25 Aug 2015 21:16:08 +0100, Edward Bartolo wrote: The contents of interfaces files created by backend are as follows, but if necessary, we can create more than more template, although it doesn't look it will be necessary.

Re: [DNG] netman GIT project

2015-08-25 Thread Rainer Weikusat
tilt! t...@linuxfoo.de writes: On 08/25/2015 02:09 PM, Rainer Weikusat wrote: Considering that this enforces some kind of 'bastard URL-encoding' (using + as prefix instead of %) for all other bytes, it's also going make people who believe that UTF-8 would be a well supported way to represent

Re: [DNG] netman GIT project

2015-08-25 Thread tilt!
Hi, On 08/25/2015 02:09 PM, Rainer Weikusat wrote: Considering that this enforces some kind of 'bastard URL-encoding' (using + as prefix instead of %) for all other bytes, it's also going make people who believe that UTF-8 would be a well supported way to represent non-ASCII characters very

Re: [DNG] netman GIT project

2015-08-25 Thread Hendrik Boom
On Tue, Aug 25, 2015 at 01:09:27PM +0100, Rainer Weikusat wrote: tilt! t...@linuxfoo.de writes: Hi Edward, On 08/25/2015 12:51 PM, Edward Bartolo wrote: [...] Please accept merge request #1 cleanup of backend binaries. Two random remarks: , | size_t

Re: [DNG] netman GIT project

2015-08-25 Thread Irrwahn
On Tue, 25 Aug 2015 13:09:27 +0100, Rainer Weikusat wrote: snip , | uint8_t essid_allowed_chars[] = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-; | | [...] | | int essid_allowed_char(uint8_t c) { | size_t i; | size_t k; | | int rv; | | rv =