su: move restricted_shell into su.c (the only user)

function                                             old     new   delta
su_main                                              448     468     +20
buffer_fill_and_print                                179     196     +17
scriptreplay_main                                    205     208      +3
localcmd                                             275     277      +2
hash_find                                            233     234      +1
devmem_main                                          469     463      -6
install_main                                         724     716      -8
setusershell                                          11       -     -11
find_pair                                            187     169     -18
restricted_shell                                      49       -     -49
------------------------------------------------------------------------------
(add/remove: 0/3 grow/shrink: 5/3 up/down: 43/-92)            Total: -49 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2010-02-26 10:01:18 +01:00
parent fd686a262f
commit 26ffe81188
4 changed files with 18 additions and 49 deletions

View File

@ -1139,7 +1139,6 @@ extern void selinux_preserve_fcontext(int fdesc) FAST_FUNC;
#define selinux_preserve_fcontext(fdesc) ((void)0)
#endif
extern void selinux_or_die(void) FAST_FUNC;
extern int restricted_shell(const char *shell) FAST_FUNC;
/* setup_environment:
* if chdir pw->pw_dir: ok: else if to_tmp == 1: goto /tmp else: goto / or die