nelze 'odevzdat' soubor?
Pavel Janík
Pavel na Janik.cz
Úterý Duben 9 19:10:35 CEST 2002
From: "Jiri Chaloupka" <dev na b2bexpander.com>
Date: Tue, 9 Apr 2002 14:15:59 +0200 (CEST)
Zdravím,
> Me to udela v pripade ze se o to pokusim jako ne-vlastnik souboru (pokud
> soubor je vlastnen beznym uzivatelem a ja se o to pokusim jako root,
> napriklad.) Pokud to udelam jako vlastnik souboru, je to ok.
> Pouzivam SuSE 7.3 a bezpecnostni pravidla "harden_suse" ci jak se to
> jmenuje :-)
nemáte pravdu, SuSE Linux stejně jako jakákoli jiná komerčně distribuovaná
distribuce si něco takového prostě nemůže dovolit.
BTW - v POSIXu je řečeno:
The following symbolic constants shall either be undefined or defined with
a value other than 1. If a constant is undefined, an application should use
the sysconf(), pathconf (), or fpathconf ( ) functions, or the getconf
utility, to determine which features are present on the system at that time
or for the particular pathname in question.
_POSIX_CHOWN_RESTRICTED
The use of chown( ) is restricted to a process with appropriate privileges,
and to changing the group ID of a file only to the effective group ID of
the process or to one of its supplementary group IDs.
No a v Linuxu je samozřejmě:
pavel na SnowWhite:~> grep -B1 POSIX_CHOWN /usr/include/bits/posix_opt.h
/* Only root can change owner of file. */
#define _POSIX_CHOWN_RESTRICTED 1
--
Pavel Janík
panic("bad_user_access_length executed (not cool, dude)");
-- 2.0.38 kernel/panic.c
Další informace o konferenci Linux