parse.c and newline

Fabrice Gonton fabrice.gonton at creditlyonnais.fr
Mon Dec 30 12:42:23 EST 2002


Hi,

I have recently posted a message in sudo-users mailing list,
concerning the ability of a newline character matching in
sudoers file (something I've tried unsuccessfully).

In fnmatch() function called by command_args(),
I haven't seen anything about newline character  (If I am wrong,
please tell me how to deal with newline character).

I have patched parse.c (sudo v1.6.6) file this way (diff file format):
- - - - - - cut here - - - -
276a277,280
>     /* Don't accept a newline character in user args */
>     if (cmnd_args && (strchr(cmnd_args,'\n') != NULL))
>       return(FALSE);
>
- - - - - - cut here - - - -

I am not really sure it is the best place for that, or the right way
to do it.

I am waiting for your comments.

Regards.

Fabrice Gonton.


-------------- next part --------------


Ce message contient des informations confidentielles ou appartenant au 
Cr?dit Lyonnais et est ?tabli ? l'intention exclusive de ses 
destinataires. Toute divulgation, utilisation, diffusion ou reproduction 
(totale ou partielle) de ce message, ou des informations qu'il contient, 
doit ?tre pr?alablement autoris?e. Tout message ?lectronique est 
susceptible d'alt?ration et son int?grit? ne peut ?tre assur?e. 
Le Cr?dit Lyonnais d?cline toute responsabilit? au titre de ce 
message s'il a ?t? modifi? ou falsifi?. Si vous n'?tes pas 
destinataire de ce message, merci de le d?truire imm?diatement et 
d'avertir l'exp?diteur de l'erreur de distribution et de la destruction
du message.
Cr?dit Lyonnais, SA au capital de Euros 1.807.874.827 - RCS Lyon B 954 509 741
Si?ge Central : 19, boulevard des Italiens. 75002 Paris. France

This e-mail contains confidential information or information belonging 
to Cr?dit Lyonnais and is intended solely for the addressees. 
The unauthorised disclosure, use, dissemination or copying (either whole 
or partial) of this e-mail, or any information it contains, is prohibited.
E-mails are susceptible to alteration and their integrity cannot be guaranteed. 
Cr?dit Lyonnais shall not be liable for this e-mail if modified or falsified.
If you are not the intended recipient of this e-mail, please delete it 
immediately from your system and notify the sender of the wrong delivery 
and the mail deletion.
Cr?dit Lyonnais SA.
Share Capital of Euros 1.807.874.827.
Registered Office : Lyon (B 954 509 741) 
Central and administrative Office : 19, boulevard des Italiens. 75002 Paris. France


More information about the sudo-workers mailing list