# Best practice to modify an error message in OpenSSH?



## olav (May 23, 2011)

I want to modify this line:
/usr/src/crypto/openssh/session.c:1842

[CMD=""]printf("This service allows sftp connections only.\n");[/CMD]

Should I just replace the text in the file? Or should I make a patch? What is the best practise when it comes to modifying this? I really want the text to be the same when I later update and recompile this.


----------



## SirDice (May 23, 2011)

Why do you want to change it?


----------



## olav (May 23, 2011)

Because I want to add a more informative description.


----------



## aragon (May 23, 2011)

A patch would be the least you should do, but it'll probably need to be maintained.  A sed replacement in the relevant Makefile might have greater longevity - just keep a patch against the Makefile.


----------

