1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-13 16:23:50 +03:00

- changed the umask handling. We now set the umask to 0 and explicitly

set the mode on all created files. I think this is a better policy.

- change the debug levels on some items

- fix a charset handling bug which affected foreign and extended
charset users

- no longer switch back to the original directory when idle, instead
switch to / as the original directory may not be readable by ordinary
users.

- fix some bugs where the create mode of files was not being
explicitly set (it was relying on the umask and using fopen). Not a
big bug as it only affected obscure commands like the messaging ops.

- got rid of the lock code in the lpq cache as its no longer needed

- rewrote smbrun to be faster and to remove the security hole. We now
don't actually need a external smbrun binary, its all done by smbd.

- add a more explicit warning about uids and gids of -1 or 65535
This commit is contained in:
Andrew Tridgell
-
parent 53a4b8769e
commit 5aa735c940
12 changed files with 180 additions and 74 deletions

View File

@@ -123,6 +123,7 @@ void reopen_logs(void)
if (!strcsequal(fname,debugf) || !dbf || !file_exist(debugf,NULL))
{
int oldumask = umask(022);
strcpy(debugf,fname);
if (dbf) fclose(dbf);
if (append_log)
@@ -130,6 +131,7 @@ void reopen_logs(void)
else
dbf = fopen(debugf,"w");
if (dbf) setbuf(dbf,NULL);
umask(oldumask);
}
}
else
@@ -205,7 +207,9 @@ va_dcl
{
if (!dbf)
{
int oldumask = umask(022);
dbf = fopen(debugf,"w");
umask(oldumask);
if (dbf)
setbuf(dbf,NULL);
else
@@ -2883,7 +2887,7 @@ connect_again:
}
if (ret < 0 && (errno == EINPROGRESS || errno == EALREADY)) {
DEBUG(2,("timeout connecting to %s:%d\n",inet_ntoa(*addr),port));
DEBUG(1,("timeout connecting to %s:%d\n",inet_ntoa(*addr),port));
close(res);
return -1;
}
@@ -2896,7 +2900,7 @@ connect_again:
#endif
if (ret < 0) {
DEBUG(2,("error connecting to %s:%d (%s)\n",
DEBUG(1,("error connecting to %s:%d (%s)\n",
inet_ntoa(*addr),port,strerror(errno)));
return -1;
}