diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/book/book.install ./modules/book/book.install
--- ../drupal-6.x-dev/modules/book/book.install	2007-10-25 17:32:55.000000000 +0200
+++ ./modules/book/book.install	2007-11-05 20:54:06.000000000 +0100
@@ -83,7 +83,7 @@ function book_update_6000() {
     $replace = array(
       'outline posts in books' => 'administer book outlines',
       'create book pages' => 'create book content',
-      'edit book pages' => 'edit book content',
+      'edit book pages' => 'edit any book content',
       'edit own book pages' => 'edit own book content',
       'see printer-friendly version' => 'access printer-friendly version',
     );
diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/node/node.install ./modules/node/node.install
--- ../drupal-6.x-dev/modules/node/node.install	2007-11-04 15:33:07.000000000 +0100
+++ ./modules/node/node.install	2007-11-05 22:29:31.000000000 +0100
@@ -335,3 +335,31 @@ function node_schema() {
   return $schema;
 }
 
+/**
+ * @defgroup updates-5.x-to-6.x Node updates from 5.x to 6.x
+ * @{
+ */
+
+/**
+ * Rename permissions "edit foo content" to "edit any foo content",
+ * and "delete foo content" to "delete any foo content".
+ * The latter is a new permission in 6.x, but it may not hurt, and
+ * helps people updating from 6.x-beta releases.
+ */
+function node_update_6000() {
+  $ret = array();
+  $result = db_query("SELECT rid, perm FROM {permission} ORDER BY rid");
+  while ($role = db_fetch_object($result)) {
+    $renamed_permission = preg_replace('/(?<=^|,\ )edit\ ([a-zA-Z0-9_\-]+)\ content(?=,|$)/', 'edit any $1 content', $role->perm);
+    $renamed_permission = preg_replace('/(?<=^|,\ )delete\ ([a-zA-Z0-9_\-]+)\ content(?=,|$)/', 'delete any $1 content', $renamed_permission);
+    if ($renamed_permission != $role->perm) {
+      $ret[] = update_sql("UPDATE {permission} SET perm = '$renamed_permission' WHERE rid = $role->rid");
+    }
+  }
+  return $ret;
+}
+
+/**
+ * @} End of "defgroup updates-5.x-to-6.x"
+ * The next series of updates should start at 7000.
+ */
diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/node/node.module ./modules/node/node.module
--- ../drupal-6.x-dev/modules/node/node.module	2007-11-05 22:34:46.000000000 +0100
+++ ./modules/node/node.module	2007-11-05 22:34:23.000000000 +0100
@@ -999,9 +999,9 @@ function node_perm() {
       $name = check_plain($type->type);
       $perms[] = 'create '. $name .' content';
       $perms[] = 'delete any '. $name .' content';
-      $perms[] = 'delete '. $name .' content';
+      $perms[] = 'delete any '. $name .' content';
       $perms[] = 'edit own '. $name .' content';
-      $perms[] = 'edit '. $name .' content';
+      $perms[] = 'edit any '. $name .' content';
     }
   }
 
@@ -2187,13 +2187,13 @@ function node_content_access($op, $node,
   }
 
   if ($op == 'update') {
-    if (user_access('edit '. $type .' content', $account) || (user_access('edit own '. $type .' content', $account) && ($user->uid == $node->uid))) {
+    if (user_access('edit any '. $type .' content', $account) || (user_access('edit own '. $type .' content', $account) && ($user->uid == $node->uid))) {
       return TRUE;
     }
   }
 
   if ($op == 'delete') {
-    if (user_access('delete '. $type .' content') || (user_access('delete own '. $type .' content') && ($user->uid == $node->uid))) {
+    if (user_access('delete any '. $type .' content') || (user_access('delete own '. $type .' content') && ($user->uid == $node->uid))) {
       return TRUE;
     }
   }
