Commit Graph

315 Commits

Author SHA1 Message Date
christos e76f287eda - check return value of write(2)
- add acl support
2012-03-08 20:41:48 +00:00
christos cde5019549 Add cvs acl support 2012-03-08 20:41:20 +00:00
christos c520239488 - Put back %, which was removed from the new format strings
[with reversed meaning, so that we are still compatible with the new format]
- Fix format strings
2012-03-08 20:41:04 +00:00
christos 3046f895f0 add acl.c 2012-03-08 20:39:28 +00:00
christos a24f5ebc91 fix malloc botches in the original code 2012-03-08 20:37:29 +00:00
christos 22d2af8da8 - restrict tag command to non-destructive operations for non-admins.
[deletion, moving is dissallowed]
- add history for tag commands
- cvs acl support
2012-03-08 20:34:35 +00:00
christos 25f203d228 - acl support
- check chdir return
2012-03-08 20:33:02 +00:00
christos 53edc8a562 acl support 2012-03-08 20:32:31 +00:00
christos 4872c424c4 announce acl support 2012-03-08 20:32:18 +00:00
christos d246e6162a add acl info 2012-03-08 20:30:38 +00:00
drochner f9e6b678d8 add patch from Redhat bug#784141 which fixes a possible
buffer overflow if used with an HTTP proxy (CVE-2012-0804)
approved by releng
2012-02-09 16:28:53 +00:00
dholland d716fa09ba Remove stray file that appears to have come from the CVS distribution.
How it got here isn't entirely clear, but it's clear that it should go.
2012-01-24 22:40:20 +00:00
joerg 3a4dc84ff4 Don't use dangling elses. 2012-01-06 15:16:02 +00:00
mhitch 2c13773a38 Add logical drive device ld - a number of raid controllers provide these.
Also fix a typo/pasto when checking devices against devices/types in the
configuration file:  use value from configuration, not the end of the
device_info table.  Devices which aren't explicitly specified in the
device_info table can now be used by adding a type entry in the config
file.
2012-01-04 16:37:45 +00:00
wiz 372160b738 Document 'cvs rdiff -p'. 2011-09-24 12:02:58 +00:00
mrg 3f55311b0b implement cvs rdiff -p. (someone please upate the manual for me :) 2011-09-24 11:37:27 +00:00
christos 2819a85a08 Allow init for new repository construction! 2011-07-29 18:47:11 +00:00
tsutsui 5fbf2258b9 Handle implicit library dependency for static builds:
- libheimbase is required by libkrb5
 - libwind is required by libhx509
2011-06-04 02:08:50 +00:00
joerg 015f3042c3 Pull in report.c, 1.107 from upstream:
Use offsetof() macro and avoid defining dummy static union for FIELD()
macro.  Makes it compilable by clang compiler.
2011-05-30 16:03:02 +00:00
joerg a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
joerg c219644b8d Fix printing of time_t 2011-05-24 15:51:00 +00:00
christos 72b8fabea7 Add missing prototype. 2011-05-15 17:52:41 +00:00
christos 2c52b012a9 missing string.h 2011-05-15 01:16:29 +00:00
christos 3326babf00 copy from misc directory 2011-05-15 01:13:29 +00:00
matt d4e4f7a60a Use static libdm so dmsetup and lvm can be linked dynamically.
Change LIBDM_* to LIBDEVMAPPER_* so LIBDM can refer to libdm.
2011-03-04 22:48:29 +00:00
matt accc87635b Use LIBDPLIBS 2011-02-11 06:35:26 +00:00
rmind 8adab6527d Build fix. 2011-02-08 10:45:40 +00:00
haad 0527bde829 Switch libdevmapper library to use libdm as it;s backend lib and do not
communicate with device-mapper directly. Our lvm stack now looks like this
lvm<->libdevmapper<->libdm<->dm where only libdm knows how our dm protocol
looks like.

No objections on tech-userlevel@.
2011-02-08 03:26:12 +00:00
haad c73e2bf000 Use DM_DEVICE_CONTROL_MODE, because mapper/control device should have 660
and not 640 permissions.
2011-01-12 08:16:23 +00:00
haad 912a040b47 Allow operator to use lvm in read-only mode. Switch LVM lock dir to
/var/run/lvm and create it in rc.d/mountcritlocal. Fix dm control device
permissions to allow rw for operator.

Test if we are running lvm commands as operator and if that it's true do not
create vg backups and do not print confusing warning.
2011-01-05 14:57:27 +00:00
pgoyette a12cad24be Fix typo - let the build proceed 2010-12-30 00:46:38 +00:00
haad d52c66bf4a Fix my yesterday fix and finally make _get_dev_size recognise partition size
for device without DIOWEDGEINFO, where DIOCGDINFO is used. Patch tested by
Martin Mersberger.
2010-12-29 23:14:21 +00:00
christos 4817a0b0b8 real override for yacc rules. 2010-12-29 19:53:32 +00:00
haad d26a38d370 Fix problem where chown was used on normal device in time when only
raw device was created. While here do some cleanup.

Problem find and reported by Martin Mersberger on current-users@.
2010-12-29 10:39:27 +00:00
haad ca7dbf8cb5 Fix bug added by my last commit. This should fix
PR: bin/44286

Reported by: mlelstv@ and Martin Mersberger.
2010-12-29 00:14:04 +00:00
christos 017d3467b1 - don't forget to restore the umask on error.
- save and restore umask for control
- chown/chgrp for raw devices
2010-12-26 14:48:34 +00:00
haad 4c90c8eeab Change way how we get device size from device. Do not use LSEEK but
DIOCGWEDGEINFO and DIOCGDINFO. This should fix problem with raidframe + lvm
reported by

Toby Karyadi on current-users@.

Thanks for reporting this issue.
2010-12-23 21:39:08 +00:00
christos 0318099292 PR/44267: Michael van Elst: LVM devices have wrong permissions
- Centralize CPPFLAGS for DM_DEVICE_{UID,GID,MODE}
- Make DM_DEVICE_GID operator DM_DEVICE_MODE 0640 to be more NetBSD like
- make all the code use DM_DEVICE_MODE instead of hard-coding.
- make sure that all mknod calls are followed by a chown call.
2010-12-23 17:46:54 +00:00
christos 3e6a896a34 false needs stdbool.h 2010-12-23 17:44:33 +00:00
mlelstv 07d2f05926 Get sector size from device properties using DIOCGDISKINFO and
use the disklabel (DIOCGDINFO) only as a fallback. This works
with wedges.
2010-12-23 14:46:25 +00:00
joerg 53ec7d85a6 Build xcvs without -g. 2010-12-18 04:23:26 +00:00
mrg 7246249458 re-add gawk 3.1.3's awk.texi 2010-12-13 06:21:53 +00:00
haad 16daab5dae Fix /var/run/dev.db dependency by adding new get_dev_name routine which
converts raw device major:minor number to block device path. By reading
/dev and using stat to find block device major:minor numbers.
2010-03-12 16:24:40 +00:00
christos 229a6fd0df make the default action abort for the empty log message; it used to be
continue. requested by joerg.
2010-02-19 23:50:55 +00:00
wiz 8f657e21de Fix typo (specifed -> specified). 2010-02-18 14:00:39 +00:00
snj 875f862227 Properly replace @MKTEMP_SH_FUNCTION@, @MKTEMP@, and @SENDMAIL@.
Fixes PR bin/39629.
2009-12-29 06:00:35 +00:00
haad ff3b5e1b34 Add support for building libdevmapper against RUMP. 2009-12-09 00:17:23 +00:00
haad 40681c67fa Add support for building RUMP_ACTION libdevmapper which will build and link
libdevmapper with RUMP kernel and libdm(RUMP based device-mapper library).
This enables testing of dmsetup and libdevmapper with RUMP.
2009-12-09 00:15:51 +00:00
haad 2c73152555 Addapt libdevmapper library to new header file changes. 2009-12-05 11:42:24 +00:00
haad 980e89047e Remove duplicated netbsd-dm.h file it is already installed in include/dev/dm.
Add own libddevmapper library header file libdm-netbsd.h.
2009-12-05 11:38:40 +00:00
haad 3d3166c313 Try to fix amd64 build. 2009-12-05 01:52:44 +00:00
haad b49e6087b6 Add two more needed files dev-swap.c and unknown.c. 2009-12-02 01:54:20 +00:00
haad 0fa7e5a89a Fix build, add missing symbols, remove unknown ioctls etc. 2009-12-02 01:53:25 +00:00
haad 447276ebab Fix comment about running ./configure script. 2009-12-02 00:59:19 +00:00
haad d685da8d62 Fix cinflicts created by import of latest lvm2tools LVM2-2-02-56. 2009-12-02 00:58:02 +00:00
haad 7c604eea85 Import of new version of lvm2tools LVM2-2-02-56. 2009-12-02 00:25:22 +00:00
haad 687f790f8f Remove not needed debugging CFLAGS. 2009-12-01 23:12:51 +00:00
haad f26bfe28da Revert my commit which have added knowledge about dm targets to libdevmapper,
this breaks abstraction. Because only lvmtools/lvmlib and device-mapper can
have knowledge about target mapping and libdevmapper only passes requests
from lvmtools to kernel and back. Bump major library and driver version.

Requested by: yamt@
2009-12-01 23:12:09 +00:00
haad cfa2bb1730 Revert my commit which added knowledge about dm targets to libdevmapper,
this breaks abstraction. Because only lvmtools/lvmlib and device-mapper can
have knowledge about target mapping and libdevmapper only passes requests
from lvmtools to kernel and back. Bump major library and driver version.

Requested by: yamt@
2009-12-01 23:11:17 +00:00
dsl 80ca15a6f8 Fix compressed server accesses.
According to http://cvs.savannah.gnu.org/viewvc/ccvs/src/?root=cvs
this was broken between revs 1.29 and 1.32 for a perion of 4 months
about 4 years ago.
Not sure at all why/how we have the broken version.
Our old code, the latest gnu code and this fix all differ slightly,
but have the same effect.
2009-11-27 18:38:29 +00:00
christos bd1f9e6807 short-circuit yacc. We cannot make %pure-parser 2009-10-29 02:36:48 +00:00
christos 6deb2c22d2 we have getdelim and getline. 2009-10-19 01:24:19 +00:00
joerg c954cd0eee Only match raw devices. Only match against the char major as extracted
from the kernel. Prevents aliasing nwt0 and rwd0e. OK haad@
2009-10-16 21:00:41 +00:00
joerg cb83818524 Fix markup. 2009-10-15 00:59:01 +00:00
apb ecf07e7982 It's expected that config will be NULL in a cvs client, but not
in a server or with a local CVSROOT.
2009-09-05 12:50:33 +00:00
dholland 39ad663dea Check group membership correctly; ingroup() returns a truth value, not a gid.
PR bin/41995.
2009-09-05 06:18:55 +00:00
haad 425cc847f0 Create default target_params parse routine which is called when we doesn't
find name of a target in known target list. This routine will pass whole param
string in a dictionary with key called params.
2009-06-09 18:29:09 +00:00
haad 869a99f661 Add const to second argument of nbsd_dm_parse_param, too. 2009-06-09 18:24:02 +00:00
haad b05bf051db Bump libdevmapper minor number, because of ioctl protocol change. 2009-06-05 20:11:21 +00:00
haad 3deb22c2eb Parse dm param string in libdevmapper and not in a dm target init function.
Create proplib param dictionary entry in libdevmapper and pass it to dm in
dm_ioctl dict.
Param target is then passed to target init function, where is parse. I like
this aproach much better than passing char **argv and trusting to user input.

XXX. Add more sanity checks in kernel.
2009-06-05 19:57:25 +00:00
christos fbb2acb8c2 change it from nonsense to english 2009-05-22 19:08:06 +00:00
tnn ce13d3aef1 fix build, #ifdef -> #if (hi christos) 2009-05-22 18:44:16 +00:00
christos d421f645e5 make this work for big endian machines too. 2009-05-22 17:51:26 +00:00
christos 9ee9e0d7de bypass the .y -> .c rule for getdate.y 2009-05-03 17:13:07 +00:00
christos b3737fd337 remove dup line. 2009-04-21 18:43:52 +00:00
christos 0b1f6791df Fix LOCALID expansion (from Anon Ymous) 2009-04-21 17:27:50 +00:00
christos 00ca2326ad regen. 2009-04-20 22:22:53 +00:00
christos ac4b68d25e Put back cvsstamp support. From Anon Ymous 2009-04-20 22:22:08 +00:00
christos 428488169d put back -u 2009-04-20 17:13:42 +00:00
christos 2d265727f9 we don't need memrchr anymore. 2009-04-12 22:30:48 +00:00
christos 889c434e54 - fix bug with cvs group auth
- use our own getopt
- add config tests for optreset
2009-04-10 11:20:28 +00:00
christos 009831ecb0 Add getopt.c which got lost. 2009-04-08 21:57:15 +00:00
christos 4a1c940567 argh. try to make this portable across all NetBSD platforms. 2009-04-08 19:02:35 +00:00
christos 3039dd7cbb fix closing paren 2009-04-08 17:24:55 +00:00
christos 0eb8ebe6b2 sorting ate a file. 2009-04-08 17:12:52 +00:00
christos 6b662a8eac deal with LP64 2009-04-08 17:03:55 +00:00
christos 601e05914b Hook cvs 2009-04-08 16:30:12 +00:00
christos 274254cdae Port over NetBSD fixes:
- remove configure hooks to other os's
- handle symlinks in cvsroot
- configurable CVS local directory name
- unlock patch
- setxid patch (handle setuid CVS and drop privileges correctly)
- when __SSP__ avoid alloca
- admin commands in history
- programmable admin group
- always enforce admin group
- protocol independent network handling (handle ipv6)
- correct issue with wrong revision in resurrected files
- centralize cvs password cleanup in memory
- don't segv if we re-enter exit handlers
- more sprintf -> snprintf
- extra empty line in editor buffer
- alias 't' with 'T' in logmsg.c for compatibility
- alias config "LocalKeyword" with "tag" and "UserAdminOptions" with
  "AdminOptions" for compatibility.
- disable Checking-prog and Update-prog for security
- take account of our current umask when computing the mode of files.
2009-04-08 16:27:51 +00:00
christos a7c918477d from ftp.gnu.org 2009-04-07 22:10:01 +00:00
haad 526dfe53d4 Merge conflicts and NetBSD local changes. 2009-02-18 12:16:13 +00:00
haad bec4d750d4 Import new lvm2tools 2.02.44 version and libdevmapper 1.02.30. 2009-02-18 11:16:14 +00:00
haad cdcbc2b421 Add xen xbd device to disk device filtering list, this will enable using of lvm
under the DomU.
2009-01-30 09:59:46 +00:00
haad bc57e405be Link cvs staticaly and and -ledit and -ltermcap to linking libraries. 2009-01-13 22:38:00 +00:00
ahoka 6930e04bce Disable stack protector warning when USE_SSP=yes. 2009-01-13 22:33:05 +00:00
christos c42a4332d6 bump versions for time_t 2009-01-11 22:42:39 +00:00
haad 0501d89c35 Remove error prints which are not fatal on NetBSD. 2009-01-06 23:21:16 +00:00
haad 7f1b6ba871 Link with -ledit, too so we can use readline support which is used for
lvm shell.
2008-12-24 02:11:53 +00:00
haad 3660eb0b59 Enable readline support which is defined by editline in the NetBSD. 2008-12-24 02:10:56 +00:00
agc 10c0eb9360 Don't set up a symbolic link between dmsetup.8 and dmsetup.1 (and
associated cat and html pages) - just use the section 8 man page
for just now.
2008-12-22 18:13:30 +00:00
haad ede2f9031c LIBDM_SRCDIR now points to lvm2/lib/libdevmapper don't need to specify
lib/libdevmapper again.
2008-12-22 01:56:22 +00:00
haad 1c5ab99701 Fix building o lvm binary LVM2TOOLS_* was changed to LVM2_*. 2008-12-22 01:51:44 +00:00
haad 9c9642a3f6 Fix build of liblvm LVM2TOOLS_* was changed LVM2_*. 2008-12-22 01:48:58 +00:00
haad 719394c69f Add NetBSD protocol description header file. Libdevmapper is now buildable
without kernel sources.
2008-12-22 01:48:10 +00:00
haad 335c1857f4 Switch Subdir from lvm2tools to lvm2. 2008-12-22 01:08:08 +00:00
haad 9d3aa12778 Remove broken merged sources of haad-dm. lvm2tools are now in gpl2/lvm2
and libdevmapper is not needed anymore.
2008-12-22 01:07:14 +00:00
haad 2b943ea665 Add reachover Makefiles to build LVM2 tools on NetBSD. 2008-12-22 00:57:58 +00:00
haad c6f73bb88c Add NetBSD bits to the original LVM2 tools sources. 2008-12-22 00:56:58 +00:00
haad 56a3493941 Import of lvm2tools 2.03.43 and libdevmapper 1.02.29. Needed to fix
haad-dm merge, because current lvm2tools sources are broken and will be
removed.
2008-12-22 00:17:35 +00:00
haad c9d0c62a0c Merge the haad-dm branch to -current. This branch adds LVM functionality to
the base NetBSD system. It uses Linux LVM2 tools and our BSD licensed
device-mapper driver.

The device-mapper driver can be used to create virtual block devices which
maps virtual blocks to real with target mapping called target. Currently
these targets are available a linear, zero, error and a snapshot (this is
work in progress and doesn't work yet).

The lvm2tools adds lvm and dmsetup binary to based system, where the lvm
tool is used to manage and administer whole LVM and the dmestup is used to
communicate iwith device-mapper kernel driver. With these tools also
a libdevmapper library is instaled to the base system.

Building of tools and driver is currently disable and can be enabled with
MKLVM=yes in mk.conf. I will add sets lists and rc.d script soon.

Oked by agc@ and cube@.
2008-12-19 15:24:03 +00:00
haad bc330923c1 Resolve conflicts created by import of lvm2tools-2.02.43. 2008-12-12 11:55:05 +00:00
haad 4726d09dbc Import of latest version of lvm2tools version 2.02.43. In this release
libdevmapper 1.02.29 release was merged by RedHat into the
lvm2tools repository.
2008-12-12 11:42:51 +00:00
haad 890ef417e2 Import of latest version of lvm2tools version 2.02.43. In this release
libdevmapper 1.02.29 release was merged by RedHat into the
lvm2tools repository.
2008-12-12 11:42:50 +00:00
haad 2acd41c7f8 Import of latest version of lvm2tools version 2.02.43. In this release
libdevmapper 1.02.29 release was merged by RedHat into the
lvm2tools repository.
2008-12-12 11:41:40 +00:00
haad 4c51be8f8c version 1.02.27-cvs 2008-07-15 13:51:16 +00:00
haad 243dd1c4d0 version 2.02.39-cvs 2008-07-15 13:48:51 +00:00