CentOS & samba-3.0.28-0.el4.9 Windows explorer refresh does not work for me ...

SATOH Fumiyasu fumiyas at osstech.jp
Fri Jun 19 16:44:27 GMT 2009


At Wed, 17 Jun 2009 09:44:26 -0400,
simo wrote:
> > > On RHEL 4 kernels inotify is not available (yes its that old and
> > > stable  :)
> > > 
> > > It is necessary to configure vfs_fam on the shares you want notification
> > > to work.
> > 
> > But gamin, that has libfam.so, does not support Samba VFS notify_fam.
> > See my comments and patches in the following page for details:
> > http://bugzilla.gnome.org/show_bug.cgi?id=345244
> 
> I don't recall seeing problems when I tested this many moons ago, but
> that would be a bug in gamin, wouldn't it ?

Really?

Gamin libfam.so and gam_server refuse and close the connection
each other if the peer's credentials (real uid/gid) don't match
with own credentials (real uid/gid).

$ uname -a
Linux sugar.osstech.co.jp 2.6.29-2-amd64 #1 SMP Sun May 17 17:15:47 UTC 2009 x86_64 GNU/Linux
$ cat socketpeercred.c
#include <stdio.h>
#include <unistd.h>
#include <sys/socket.h>

int main(int argc, char *argv[])
{
  struct ucred cred;
  socklen_t cred_len = sizeof(cred);
  int fds[2];

  setegid(2000);
  seteuid(1000);

  if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) == -1) {
    perror("socketpair() failed");
    return 1;
  }

  if (getsockopt(fds[0], SOL_SOCKET, SO_PEERCRED, &cred, &cred_len) == -1) {
    perror("getsockopt() failed");
    return 1;
  }

  printf("\t%-8s %-9s %-9s\n", "What", "Real", "Effective");
  printf("\t%-8s %-9d %-9d\n", "Own UID", getuid(), geteuid());
  printf("\t%-8s %-9d %-9d\n", "Own GID", getgid(), getegid());
  printf("\t%-8s %-9d\n", "Peer UID", cred.uid);
  printf("\t%-8s %-9d\n", "Peer GID", cred.gid);

  return 0;
}

$ gcc -Wall -D_GNU_SOURCE socketpeercred.c
$ sudo ./a.out
What     Real      Effective
Own UID  0         1000
Own GID  0         2000
Peer UID 1000
Peer GID 2000

-- 
-- Name: SATOH Fumiyasu (fumiyas @ osstech co jp)
-- Business Home: http://www.OSSTech.co.jp/
-- Personal Home: http://www.SFO.jp/blog/


More information about the samba-technical mailing list