]> arthur.barton.de Git - netatalk.git/commitdiff
Merge 2-2
authorFrank Lahm <franklahm@googlemail.com>
Thu, 26 Apr 2012 13:59:43 +0000 (15:59 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Thu, 26 Apr 2012 13:59:43 +0000 (15:59 +0200)
1  2 
NEWS
libatalk/dsi/dsi_getsess.c
libatalk/util/server_child.c

diff --combined NEWS
index 7681bc2b25a77531151227ed5a66d9dddf77131a,68da4aa24729e00a6a2e29707bf626ad9157382b..d73830c7b1f152241fd9016693377d636ecbb4b4
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -1,66 -1,3 +1,66 @@@
 +Changes in 3.0 alpha3
 +=====================
 +
 +* NEW: afpd: Per volume "login message", NetAFP bug ID #18
 +* NEW: afpd: Cross-platform locking (share modes) on Solaris and derivates
 +       with Solaris CIFS/SMB server. Uses new Solaris fcntl F_SHARE share
 +       reservation locking primitives. Enabled by default, set global
 +       "solaris share reservations" option to false to disable it.
 +* NEW: ad: ad set subcommand for changing Mac metadata on the server
 +* UPD: unix charset is UTF8 by default
 +       vol charset is same value as unix charset by default
 +* UPD: .AppleDesktop/ are stored in $localstatedir/netatalk/CNID
 +       (default: /var/netatalk/CNID), databases found in AFP volumes are
 +       automatically moved
 +* FIX: afpd: Server info packet was malformed resulting in broken
 +       server names being displayed on clients
 +* FIX: afpd: Byte order detection. Fixes an error where Netatalk on
 +       OpenIndiana returned wrong volume size information.
 +
 +Changes in 3.0 alpha2
 +=====================
 +
 +* UPD: afpd: Store '.' as is and '/' as ':' on the server, don't
 +       CAP hexencode as "2e" and "2f" respectively
 +* UPD: afdp: Automatic name conversion, renaming files and directories
 +       containing CAP sequences to their not enscaped forms
 +* UPD: afpd: Correct handling of user homes and users without homes
 +* UPD: afpd: Perform complete automatic adouble:v2 to adouble:ea conversion
 +       as root. Previously only unlinking the adouble:v2 file was done as root
 +* UPD: dbd: -C option removes CAP encoding
 +* UPD: Add graceful option to RedHat init script
 +* UPD: Add --disable-bundled-libevent configure options When set to yes,
 +       we rely on a properly installed version on libevent CPPFLAGS and LDFLAGS
 +       should be set properly to pick that up
 +* UPD: Run ldconfig on Linux at the end of make install
 +* FIX: afpd: ad cp on appledouble = ea volumes
 +* FIX: dbd: ignore ._ appledouble files
 +* REM: Volumes options "use dots" and "hex encoding"
 +
 +Changes in 3.0 alpha1
 +=====================
 +
 +* NEW: Central configuration file afp.conf which replaces all previous files
 +* NEW: netatalk: service controller starting and restarting afpd and cnid_metad
 +       as necessary
 +* NEW: afpd: Extended Attributes AppleDouble backend (default)
 +* UPD: CNID databases are stored in $localstatedir/netatalk/CNID
 +       (default: /var/netatalk/CNID), databases found in AFP volumes are
 +       automatically moved
 +* UPD: Start scripts and service manifests have been changed to only start
 +       the new netatalk service controller process
 +* UPD: afpd: UNIX privileges and use dots enabled by default
 +* UPD: afpd: Support for arbitrary AFP volumes using variable expansion has been
 +       removed
 +* UPD: afpd: afp_voluuid.conf and afp_signature.conf location has been
 +       changed to $localstatedir/netatalk/ (default: /var/netatalk/)
 +* UPD: afpd: default server messages dir changed to $localstatedir/netatalk/msg/
 +* UPD: dbd: new option -C for conversion from AppleDouble v2 to ea
 +* REM: AppleTalk support has been removed
 +* REM: afpd: SLP and AFP proxy support have been removed
 +* REM: afpd: legacy file extension to type/creator mapping has been removed
 +* REM: afpd: AppleDouble backends v1, osx and sfm have been removed
 +
  Changes in 2.2.3
  ================
  
@@@ -75,6 -12,8 +75,8 @@@
  * FIX: afpd: Dont use searchdb when doing partial name search
  * FIX: afpd: Fix a possible bug handling disconnected sessions,
         NetAFP Bug ID #16
+ * FIX: afpd: Close IPC fds in afpd session child inherited from the afpd
+        master process
  * FIX: dbd: Don't remove BerkeleyDB if it's still in use by eg cnid_dbd, fixes
         bug introduced in 2.2.2
  * FIX: debian initscript: start avahi-daemon (if available) before atalkd
index 7c668ec8a62cd3e7c921ad9666d07d0661a37901,7a6109d15bac9c2e6c1fce0d9e6cc9b95986e4d8..8d6e544cdbc5d620d725abf70a158127b0ebf4b2
  #include <sys/types.h>
  #include <sys/socket.h>
  
 -/* POSIX.1 sys/wait.h check */
  #include <sys/types.h>
 -#ifdef HAVE_SYS_WAIT_H
  #include <sys/wait.h>
 -#endif /* HAVE_SYS_WAIT_H */
 -#ifndef WEXITSTATUS
 -#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
 -#endif /* ! WEXITSTATUS */
 -#ifndef WIFEXITED
 -#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
 -#endif /* ! WIFEXITED */
 -
  #include <sys/time.h>
  #include <atalk/logger.h>
  #include <atalk/util.h>
@@@ -64,6 -74,7 +64,7 @@@ afp_child_t *dsi_getsession(DSI *dsi, s
        dsi->header.dsi_code = DSIERR_OK;
        kill(pid, SIGQUIT);
      }
+     close(ipc_fds[1]);
      dsi->proto_close(dsi);
      return child;
    }
@@@ -80,8 -91,8 +81,9 @@@
    }
  
    /* get rid of some stuff */
+   close(ipc_fds[0]);
    close(dsi->serversock);
 +  dsi->serversock = -1;
    server_child_free(serv_children); 
  
    switch (dsi->header.dsi_command) {
      dsi_opensession(dsi);
      if ((child = calloc(1, sizeof(afp_child_t))) == NULL)
          exit(EXITERR_SYS);
 +
 +    child->ipc_fds[0] = -1;
      child->ipc_fds[1] = ipc_fds[1];
 +    close(ipc_fds[0]);
      return child;
 -    break;
  
    default: /* just close */
      LOG(log_info, logtype_dsi, "DSIUnknown %d", dsi->header.dsi_command);
index 59c8c7e5de657d2b0b84524e4ffc1133fb924cdc,7fea57c8305a768cde34bc2b4fb72d0f62074e60..b4bc3542acf562731539744a20f7f1136f718d68
  
  #include <stdlib.h>
  #include <string.h>
 -#ifdef HAVE_UNISTD_H
  #include <unistd.h>
 -#endif /* HAVE_UNISTD_H */
  #include <signal.h>
  #include <errno.h>
 -
 -/* POSIX.1 sys/wait.h check */
  #include <sys/types.h>
 -#ifdef HAVE_SYS_WAIT_H
  #include <sys/wait.h>
 -#endif /* HAVE_SYS_WAIT_H */
  #include <sys/time.h>
  
  #include <atalk/logger.h>
@@@ -55,6 -61,8 +55,6 @@@ typedef struct server_child_fork 
      void (*cleanup)(const pid_t);
  } server_child_fork;
  
 -int parent_or_child; /* 0: parent, 1: child */
 -
  static inline void hash_child(struct server_child_data **htable,
                                struct server_child_data *child)
  {
@@@ -199,6 -207,7 +199,7 @@@ void server_child_free(server_child *ch
      server_child_fork *fork;
      struct server_child_data *child, *tmp;
      int i, j;
+     pid_t pid = getpid();
  
      for (i = 0; i < children->nforks; i++) {
          fork = (server_child_fork *) children->fork + i;
              child = fork->table[j]; /* start at the beginning */
              while (child) {
                  tmp = child->next;
+                 if (child->ipc_fds[0] != -1)
+                     close(child->ipc_fds[0]);
                  if (child->clientid) {
                      free(child->clientid);
                  }