OT - Re: jak nejlepe na praci s casem

Juraj Lutter freebsd-users-l at wilbury.sk
Wed Apr 22 15:27:57 CEST 2009


Jan Friedel wrote:
> On Wed, Apr 22, 2009 at 02:39:31PM +0200, Daniel Gerzo wrote:
>> Jan Friedel wrote:
>>> On Wed, Apr 22, 2009 at 02:00:20PM +0200, Indigo wrote:
>>>> Ahoj,
>>>> jednak bych doporucil drobnou optimalizaci:
>>>>
>>>> vystup=`mysql -uroot -pheslo < EOF
>>>> SELECT DATEDIFF('2009-03-09', '2011-03-09');
>>>> EOF`
>>> 	Heslo na prikazove radce - nikdy. Cim dele trva dotaz do
>>> 	databaze, tim vetsi je sance nechteneho odhaleni hesla ostatnimi
>>> 	uzivateli jen pomoci `ps -wax`.
>> security.bsd.see_other_uids=0
>> security.bsd.see_other_gids=0
> 
> 	Otazka je, jestli toto je vzdy vhodne.. 
> 
> 	Ale jinak dobry hint o kterem jsem nevedel ;)


mysql -B --defaults-file=/cesta/k/configu ...

do configu:

[client]
user=...
password=...

config nemusi byt citatelny pre ineho usera, ako vykonavajuceho danu sql 
query. tym padom heslo v procesoch vidiet nie je. navyse, mysql binarka 
pouziva setproctitle() na skrytie skutocneho argumentu k -p.

otis



-- 
Juraj Lutter                            |  /\  ASCII Ribbon Campaign
otis (at) wilbury (dot) sk              |  \/  - NO HTML/RTF in e-mail
http://www.wilbury.sk/                  |  /\  - NO Word docs in e-mail
JID: otis (at) jabber (dot) vx (dot) sk
!07/11 PDP a ni deppart m'I  !pleH



More information about the Users-l mailing list