diff options
author | Jeremy Allison <jra@samba.org> | 1998-12-29 00:03:38 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-12-29 00:03:38 +0000 |
commit | 18697e90d06518a9a5fd6cf47b59d2e3b7eca0ff (patch) | |
tree | 9397dde03ffbd7c57f1fedf38474e6e1afc2c232 /source/include | |
parent | 80dfe5dcbc6f327be4ba1f2871ac84e282c9de9d (diff) | |
download | samba-18697e90d06518a9a5fd6cf47b59d2e3b7eca0ff.tar.gz samba-18697e90d06518a9a5fd6cf47b59d2e3b7eca0ff.tar.xz samba-18697e90d06518a9a5fd6cf47b59d2e3b7eca0ff.zip |
lib/signal.c: Added CatchChildLeaveStatus() call needed in smbd/open.c and smbd/chgpasswd.c.
smbd/chgpasswd.c
smbd/open.c: Ensure that we replace SIGCLD handler with CatchChildLeaveStatus()
*before* we expect to reap a child status - and reset it to CatchChild()
after we've done the sys_waitpid(). The original CatchChild() code
would eat the status code from the zombie in the signal handler, meaning
that the sys_waitpid() calls in check_access_allowed_for_current_user()
and chgpasswd would never return a status.
smbd/open.c:
smbd/reply.c:
smbd/close.c: Check error return on close() calls - ensure a valid error return
is sent back to the client. This catches the "file truncated"
bug when a user has run out of quota (or space) and the ENOSPC
error is returned on the *close()* call, not the write() (eg. on
an nfs mounted drive).
smbd/fileio.c: Added check for ESPIPE on sys_lseek() in file_seek() to allow
people to use Windows clients to communicate with UNIX fifo's
(like they could in 1.9.18).
Jeremy.
Diffstat (limited to 'source/include')
-rw-r--r-- | source/include/proto.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/include/proto.h b/source/include/proto.h index dc5763198f0..1f4f522ac77 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -148,6 +148,7 @@ char *rep_inet_ntoa(struct in_addr ip); void BlockSignals(BOOL block,int signum); void CatchSignal(int signum,void (*handler)(int )); void CatchChild(void); +void CatchChildLeaveStatus(void); /*The following definitions come from lib/slprintf.c */ @@ -316,6 +317,7 @@ void gain_root_privilege(void); void gain_root_group_privilege(void); int set_effective_uid(uid_t uid); int set_effective_gid(gid_t gid); +int set_real_uid(uid_t uid); BOOL become_user_permanently(uid_t uid, gid_t gid); /*The following definitions come from lib/util_sid.c */ @@ -2280,7 +2282,7 @@ BOOL change_oem_password(struct smb_passwd *smbpw, char *new_passwd, BOOL overri /*The following definitions come from smbd/close.c */ -void close_file(files_struct *fsp, BOOL normal_close); +int close_file(files_struct *fsp, BOOL normal_close); void close_directory(files_struct *fsp); /*The following definitions come from smbd/conn.c */ @@ -2432,7 +2434,7 @@ int reply_nttrans(connection_struct *conn, /*The following definitions come from smbd/open.c */ void fd_add_to_uid_cache(file_fd_struct *fd_ptr, uid_t u); -uint16 fd_attempt_close(file_fd_struct *fd_ptr); +uint16 fd_attempt_close(file_fd_struct *fd_ptr, int *err_ret); void open_file_shared(files_struct *fsp,connection_struct *conn,char *fname,int share_mode,int ofun, mode_t mode,int oplock_request, int *Access,int *action); int open_directory(files_struct *fsp,connection_struct *conn, |