Modified version of rlm_counter for FR3
Hi, on bitbucket there is my version of rlm_counter for FR3 (search for rlm_counter-v3 , user = ntt1985). Let me know if this version can be useful for other users. Every question/comment/criticism is welcome. Thanks MM
Marco Marino wrote:
on bitbucket there is my version of rlm_counter for FR3 (search for rlm_counter-v3 , user = ntt1985). Let me know if this version can be useful for other users. Every question/comment/criticism is welcome.
You could explain *why* you modified it, and *what* new functionality it has. And post a link to it. You have the URL in front of you. Asking us to search for it means we're not going to do that. Alan DeKok.
It's a modified version of rlm_counter. New features: 1) Per realm or per nas-identifier different counters with possibility of set reply and check item values. Logical behavior is (per realm counter example) - if the user "has" a realm and this realm is present in the configuration file, then it returns check and reply values in the config file. - else -> normal behavior of freeradius. 2) Avoid the gdbm database reset after a freeradius restart using the configuration file. Pay attention please: rlm_counter needs the "daily" directive in the authorize and accounting sections! Repository is here -> https://bitbucket.org/ntt1985/rlm_counter-v3 (i'm not so sure. I'm not using well bitbucket, so if we have problems, please mail me) In the repository there is a file named counter that contains an example for a configuration file. Use this in mods-available/counter and create a symbolic link in mods-enabled/ Thanks, MM 2014-03-11 14:59 GMT+01:00 Alan DeKok <aland@deployingradius.com>:
Marco Marino wrote:
on bitbucket there is my version of rlm_counter for FR3 (search for rlm_counter-v3 , user = ntt1985). Let me know if this version can be useful for other users. Every question/comment/criticism is welcome.
You could explain *why* you modified it, and *what* new functionality it has.
And post a link to it. You have the URL in front of you. Asking us to search for it means we're not going to do that.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
On 11 Mar 2014, at 19:18, Marco Marino <marino.mrc@gmail.com> wrote:
It's a modified version of rlm_counter. New features: 1) Per realm or per nas-identifier different counters with possibility of set reply and check item values. Logical behavior is (per realm counter example) - if the user "has" a realm and this realm is present in the configuration file, then it returns check and reply values in the config file. - else -> normal behavior of freeradius. 2) Avoid the gdbm database reset after a freeradius restart using the configuration file.
Pay attention please: rlm_counter needs the "daily" directive in the authorize and accounting sections!
Repository is here -> https://bitbucket.org/ntt1985/rlm_counter-v3 (i'm not so sure. I'm not using well bitbucket, so if we have problems, please mail me) In the repository there is a file named counter that contains an example for a configuration file. Use this in mods-available/counter and create a symbolic link in mods-enabled/
I appreciate your contribution, but putting fixes in with your initial commit makes it impossible to see what the fixes were. Also you're using bitbucket, which is made by Atlassian, and Atlassian is an awful company which makes truly awful and unusable software. You can always tell you're using Atlassian software, because the experience is accompanied by the urge to self lobotomise with the nearest pointy object. JIRA and Confluence are universally hated by almost every engineer and system administrator who comes in contact with them, and almost universally loved by project managers, it's bizarre. The only theory I have for this, is that perhaps PM's being raised on Excel, Powerpoint and word, feel a bit lost when the application they're working with isn't repeatedly kicking them in the nads. jira: "Oh you want to close your task?" user: "Yes" jira: "FUCK YOU, VALIDATION ERROR, FIELD ON ANOTHER SCREEN" user: "Huh? What?" jira: "FIELD ON ANOTHER SCREEN *KICK*" user: "Why don't you just display the field on this screen?" jira: "BECAUSE SUCK DICK AND DIE *KICK KICK KICK KICK*" Anyway. Your patches sound useful, but like the previous code you sent are difficult to review as they've just been munged with the original source. If you break out your changes into small commits, we can actually review them, and merge them, or at least provide useful feedback. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Marco Marino wrote:
It's a modified version of rlm_counter.
It's easier to see what's changed if you start off with the main FreeRADIUS git repository. There is no benefit to pulling out rlm_counter, and putting it into it's own git repository. Doing that makes it impossible to tell what's changed. It's impossible to use git to pull the changes back into the main repository. Instead of using git, we've got to apply the patches by hand. i.e. this negates *all* benefit of using git. Please use github to fork the main FreeRADIUS repository. Then, commit your patches one by one. Then, submit a "pull" request.
In the repository there is a file named counter that contains an example for a configuration file. Use this in mods-available/counter and create a symbolic link in mods-enabled/
As opposed to just modifying the raddb/mods-available/counter file directly, and tracking those changes in git. You've made it as difficult as possible for us to accept these changes. Why? And things like this in the code will NEVER be accepted: //MM /* * Define a structure for single counter object */ typedef struct single_counter_t { char *name; int check; int reply; struct single_counter_t *next; } single_counter_t; //ENDMM There is NO REASON to put your initials into the code. If you need to track who changed the code, use "git". Alan DeKok.
i think you have not understood the sense of this contribute. I don't have experience with git, so i thought that create a my own repository was a better idea. I don't known atlassian or jira, and i'm using atlassian instead of github only because it's free and i can create private repository. It is obvious that //MM ... code ... //ENDMM cannot be pushed in the main repository of freeradius. I'm using this only for track changes to code. This is a bad idea, ok, but, as i mentioned before, it's due to my inexperience with git. That i can do is: - create a new public repository (on bitbucket or github, it's the same in my case!) - init this repo with the original code of the rlm_counter module - Pushing new code gradually Sincerely, i don't know how create a fork on github and i don't know if it is useful for a single module composed of a single file. This is not my primary job, i wanted write this code because it is a need in my company and i thought that there may be other users with same needs. I'm sorry if i done something stupid. MM 2014-03-12 0:01 GMT+01:00 Alan DeKok <aland@deployingradius.com>:
Marco Marino wrote:
It's a modified version of rlm_counter.
It's easier to see what's changed if you start off with the main FreeRADIUS git repository. There is no benefit to pulling out rlm_counter, and putting it into it's own git repository.
Doing that makes it impossible to tell what's changed. It's impossible to use git to pull the changes back into the main repository. Instead of using git, we've got to apply the patches by hand.
i.e. this negates *all* benefit of using git.
Please use github to fork the main FreeRADIUS repository. Then, commit your patches one by one. Then, submit a "pull" request.
In the repository there is a file named counter that contains an example for a configuration file. Use this in mods-available/counter and create a symbolic link in mods-enabled/
As opposed to just modifying the raddb/mods-available/counter file directly, and tracking those changes in git.
You've made it as difficult as possible for us to accept these changes. Why?
And things like this in the code will NEVER be accepted:
//MM /* * Define a structure for single counter object */ typedef struct single_counter_t { char *name; int check; int reply; struct single_counter_t *next; } single_counter_t; //ENDMM
There is NO REASON to put your initials into the code. If you need to track who changed the code, use "git".
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
On Wed, Mar 12, 2014 at 3:00 PM, Marco Marino <marino.mrc@gmail.com> wrote:
Sincerely, i don't know how create a fork on github and i don't know if it is useful for a single module composed of a single file. This is not my primary job, i wanted write this code because it is a need in my company and i thought that there may be other users with same needs. I'm sorry if i done something stupid.
Marco, Your intent is highly appreciated. And what you've done is not stupid. It's just that the way you do it, the devs will need to allocate more time and effort to even review your code. If your intention is to simply "put your code out in the open", then what you've done is probably enough. Those who currently face the same problem might be able to find your code thru the list archive. However if you want your contribution to make it upstream, you need to follow up on that by forking current freeradius repo on github, adding your commits (with relevant commit notes), and then sending a pull request. It's actually very easy once you get used to it. However it does require some time to learn. -- Fajar
Marco Marino wrote:
i think you have not understood the sense of this contribute. I don't have experience with git, so i thought that create a my own repository was a better idea.
It's easier for you, and harder for us. That's all I'm saying. When you make it difficult for us to look at the patches, we're likely to just ignore them. That's the reality of open source development.
I don't known atlassian or jira, and i'm using atlassian instead of github only because it's free and i can create private repository.
github is free, too. You don't need to create a private repository for changes to rlm_counter. The repository needs to be public. Alan DeKok.
participants (4)
-
Alan DeKok -
Arran Cudbard-Bell -
Fajar A. Nugraha -
Marco Marino