The web interface spoilt all the indentation and hence resending from a 
mail client.


Hi Abhilash,

I am not an expert in this area and hence would leave others to comment 
on the accuracy of the code changes, I have some minor comments on the 
coding style

dns.c

1.  Line 257
The bracket needs to be on the same column as the "if" on line 252

2. All statement continuations should start after 4 spaces and not a tab.
This is seen on multiple lines

For example

240         rc = scds_get_ext_property(handle, user, SCHA_PTYPE_STRING,
241                 &user_name_st);

On Line 241, you have used a tab instead of 4 spaces.

It should look like

240         rc = scds_get_ext_property(handle, user, SCHA_PTYPE_STRING,
241             &user_name_st);
 
Taking a more indepth look, I see this problem even in existing code. So 
I guess you may ignore this.

3. Lines 252 - 257
Your single statement on line 253 spans over the remianing lines. If you 
choose to ignore point 2 above, you still need to allign lines 255, 256 
with 254

The original code is

252                         if (print_messages) {
253                                 (void) fprintf(stderr,
254                                         gettext("Data buffer for 
user %s "
255                                                 "is not big enough.\n"),
256                                                 
user_name_st->val.val_str);

The revamped code

252                         if (print_messages) {
253                                 (void) fprintf(stderr,
254                                         gettext("Data buffer for 
user %s "
255                                         "is not big enough.\n"),
256                                         user_name_st->val.val_str);

If you are going to follow point 2, then

252                         if (print_messages) {
253                                 (void) fprintf(stderr,
254                                     gettext("Data buffer for user %s "
255                                     "is not big enough.\n"),
256                                     user_name_st->val.val_str);

4. Continuation lines need to be indented by 4 space

556                 scds_syslog(LOG_ERR,
557                 "Failed to retrieve the extension property %s: %s.",
558                 user, scds_error_string(rc));

Needs to be changed to

556                 scds_syslog(LOG_ERR,
557                     "Failed to retrieve the extension property %s: %s.",
558                     user, scds_error_string(rc));

5. Line 562
Since you are ignoring the return value, cast it to void else lint will 
complain

562         strcpy(user_name, user_name_st->val.val_str);

needs to be changed to

562         (void) strcpy(user_name, user_name_st->val.val_str);

Thanks,
Tirthankar




Abhilash T.G wrote:
> Hello,
>
>    I am Abhilash T.G (OS0183). I have done the CR-6530498. The changes 
> can be viewed at 
> http://cr.opensolaris.org/~hari.sun/DNS_non-root_user_prop/webrev/ 
> <http://cr.opensolaris.org/%7Ehari.sun/DNS_non-root_user_prop/webrev/>
>
> The synopsis is ....
>
> *Bug ID*      6530498
> *Synopsis*    HA DNS should provide a property to allow the DNS service 
> to be run as a non-root user
> *State*       1-Dispatched (Default State)
> *Category:Subcategory*        suncluster:ha-dns
> *Keywords*    DNS | named | non-root | oss-bite-size | oss-request | user
> *Sponsor*     
> *Submitter*   
> *Reported Against*    
> *Duplicate Of*        
> *Introduced In*       
> *Commit to Fix*       
> *Fixed In*    
> *Release Fixed*       
> *Related Bugs*        
> *Submit Date*         02-MAR-2007
> *Last Update Date*    20-DEC-2007
> *Description*         
> Customer request via the Sun Cluster forum:
>
> I'd like the DNS HA Agent for Sun Cluster 3.2 to be modified so that the 
> admin can choose to run BIND as a
> non-root user ie. named. This functionality is desirable for security 
> reasons, as it gives the admin a layer of protection in 
>
> the event that BIND is compromised. As a non-root process, it won't be 
> capable of doing
> as much damage as a compromised root process could. This behaviour is similar 
> to how Apache works, and is already 
> available by specifying "-u <userid>" when starting BIND from the command 
> line, or setting 'user'
>
> and 'group' in method_credential in the SMF manifest.
>
>       
>
>       
>
>       
>
>       
> *Work Around*         
> N/A
>
>
>
> My Sponsor Harish has done the testing...
>
> I request you all to please review the changes.
>
> Regards
> Abhilash
>
> -- 
> Have the courage to follow your heart and intuitions, they somehow 
> already know what you truly wants
> ------------------------------------------------------------------------
>
> _______________________________________________
> ha-clusters-discuss mailing list
> ha-clusters-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/ha-clusters-discuss
>   


Reply via email to