diff options
author | Jeremy Allison <jra@samba.org> | 2001-02-27 21:46:01 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-02-27 21:46:01 +0000 |
commit | 8e99021e65f2d358b2ffc89e31bc2499c9b74690 (patch) | |
tree | a6d61b6c31b8dd7d5139fa1c326b56c03315bd76 /source3 | |
parent | 6ee504d0fc475e57b3465b1eb1ce17374f2865f1 (diff) | |
download | samba-8e99021e65f2d358b2ffc89e31bc2499c9b74690.tar.gz samba-8e99021e65f2d358b2ffc89e31bc2499c9b74690.tar.bz2 samba-8e99021e65f2d358b2ffc89e31bc2499c9b74690.zip |
Fixes from Toomas Soome <tsoome@ut.ee> code unicode problems, plus
a solaris quota update fix.
Jeremy.
(This used to be commit 9efd7a778b7b172d76af922c3dda8ec31d74bd7d)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/codepages/CPISO8859-13.TXT | 139 | ||||
-rw-r--r-- | source3/smbd/quotas.c | 26 |
2 files changed, 86 insertions, 79 deletions
diff --git a/source3/codepages/CPISO8859-13.TXT b/source3/codepages/CPISO8859-13.TXT index 82785a4c03..655acd6aba 100644 --- a/source3/codepages/CPISO8859-13.TXT +++ b/source3/codepages/CPISO8859-13.TXT @@ -1,11 +1,10 @@ # -# Name: ISO 8859-15 to Unicode +# Name: ISO 8859-13 to Unicode # Unicode version: 1.1 -# Table version: 0.1 +# Table version: 0.2 # Table format: Format A -# Date: 16 January 1995 -# Authors: Tim Greenwood <greenwood@r2me2.enet.dec.com> -# John H. Jenkins <John_Jenkins@taligent.com> +# Date: 19 February 2001 +# Authors: Toomas Soome <tsoome@ut.ee> # # Copyright (c) 1991-1995 Unicode, Inc. All Rights reserved. # @@ -26,14 +25,14 @@ # General notes: # # This table contains the data the Unicode Consortium has on how -# ISO 8859-15 characters map into Unicode. +# ISO 8859-13 characters map into Unicode. # # Format: Three tab-separated columns -# Column #1 is the ISO 8859-15 code (in hex as 0xXX) +# Column #1 is the ISO 8859-13 code (in hex as 0xXX) # Column #2 is the Unicode (in hex as 0xXXXX) # Column #3 the Unicode name (follows a comment sign, '#') # -# The entries are in ISO 8859-15 order +# The entries are in ISO 8859-13 order # # Any comments or problems, contact <tsoome@ut.ee> # @@ -133,98 +132,98 @@ 0x7D 0x007D # RIGHT CURLY BRACKET 0x7E 0x007E # TILDE 0xA0 0x00A0 # NO-BREAK SPACE -0xA1 0x00A1 # INVERTED EXCLAMATION MARK +0xA1 0x201D # RIGHT DOUBLE QUOTATION MARK 0xA2 0x00A2 # CENT SIGN 0xA3 0x00A3 # POUND SIGN -0xA4 0x20AC # EURO SIGN -0xA5 0x00A5 # YEN SIGN -0xA6 0x0160 # LATIN CAPITAL LETTER S WITH CARON +0xA4 0x00A4 # CURRENCY SIGN +0xA5 0x201E # DOUBLE LOW-9 QUOTATION MARK +0xA6 0x00A6 # BROKEN BAR 0xA7 0x00A7 # SECTION SIGN -0xA8 0x0161 # LATIN SMALL LETTER S WITH CARON +0xA8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE 0xA9 0x00A9 # COPYRIGHT SIGN -0xAA 0x00AA # FEMININE ORDINAL INDICATOR +0xAA 0x0156 # LATIN CAPITAL LETTER R WITH CEDILLA 0xAB 0x00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK 0xAC 0x00AC # NOT SIGN 0xAD 0x00AD # SOFT HYPHEN 0xAE 0x00AE # REGISTERED SIGN -0xAF 0x00AF # MACRON +0xAF 0x00C6 # LATIN CAPITAL LETTER AE 0xB0 0x00B0 # DEGREE SIGN 0xB1 0x00B1 # PLUS-MINUS SIGN 0xB2 0x00B2 # SUPERSCRIPT TWO 0xB3 0x00B3 # SUPERSCRIPT THREE -0xB4 0x017D # LATIN CAPITAL LETTER Z WITH CARON +0xB4 0x201C # LEFT DOUBLE QUOTATION MARK 0xB5 0x00B5 # MICRO SIGN 0xB6 0x00B6 # PILCROW SIGN 0xB7 0x00B7 # MIDDLE DOT -0xB8 0x017E # LATIN SMALL LETTER Z WITH CARON +0xB8 0x00F8 # LATIN SMALL LETTER O WITH STROKE 0xB9 0x00B9 # SUPERSCRIPT ONE -0xBA 0x00BA # MASCULINE ORDINAL INDICATOR +0xBA 0x0157 # LATIN SMALL LETTER R WITH CEDILLA 0xBB 0x00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -0xBC 0x0152 # LATIN CAPITAL LIGATURE OE -0xBD 0x0153 # LATIN SMALL LIGATURE OE -0xBE 0x0178 # LATIN CAPITAL LETTER Y WITH DIAERESIS -0xBF 0x00BF # INVERTED QUESTION MARK -0xC0 0x00C0 # LATIN CAPITAL LETTER A WITH GRAVE -0xC1 0x00C1 # LATIN CAPITAL LETTER A WITH ACUTE -0xC2 0x00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX -0xC3 0x00C3 # LATIN CAPITAL LETTER A WITH TILDE +0xBC 0x00BC # VULGAR FRACTION ONE QUARTER +0xBD 0x00BD # VULGAR FRACTION ONE HALF +0xBE 0x00BE # VULGAR FRACTION THREE QUARTERS +0xBF 0x00E6 # LATIN SMALL LETTER AE +0xC0 0x0104 # LATIN CAPITAL LETTER A WITH OGONEK +0xC1 0x012E # LATIN CAPITAL LETTER I WITH OGONEK +0xC2 0x0100 # LATIN CAPITAL LETTER A WITH MACRON +0xC3 0x0106 # LATIN CAPITAL LETTER C WITH ACUTE 0xC4 0x00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS 0xC5 0x00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE -0xC6 0x00C6 # LATIN CAPITAL LETTER AE -0xC7 0x00C7 # LATIN CAPITAL LETTER C WITH CEDILLA -0xC8 0x00C8 # LATIN CAPITAL LETTER E WITH GRAVE +0xC6 0x0118 # LATIN CAPITAL LETTER E WITH OGONEK +0xC7 0x0112 # LATIN CAPITAL LETTER E WITH MACRON +0xC8 0x010C # LATIN CAPITAL LETTER C WITH CARON 0xC9 0x00C9 # LATIN CAPITAL LETTER E WITH ACUTE -0xCA 0x00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX -0xCB 0x00CB # LATIN CAPITAL LETTER E WITH DIAERESIS -0xCC 0x00CC # LATIN CAPITAL LETTER I WITH GRAVE -0xCD 0x00CD # LATIN CAPITAL LETTER I WITH ACUTE -0xCE 0x00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX -0xCF 0x00CF # LATIN CAPITAL LETTER I WITH DIAERESIS -0xD0 0x00D0 # LATIN CAPITAL LETTER ETH (Icelandic) -0xD1 0x00D1 # LATIN CAPITAL LETTER N WITH TILDE -0xD2 0x00D2 # LATIN CAPITAL LETTER O WITH GRAVE +0xCA 0x0179 # LATIN CAPITAL LETTER Z WITH ACUTE +0xCB 0x0116 # LATIN CAPITAL LETTER E WITH DOT ABOVE +0xCC 0x0122 # LATIN CAPITAL LETTER G WITH CEDILLA +0xCD 0x0136 # LATIN CAPITAL LETTER K WITH CEDILLA +0xCE 0x012A # LATIN CAPITAL LETTER I WITH MACRON +0xCF 0x013B # LATIN CAPITAL LETTER L WITH CEDILLA +0xD0 0x0160 # LATIN CAPITAL LETTER S WITH CARON +0xD1 0x0143 # LATIN CAPITAL LETTER N WITH ACUTE +0xD2 0x0145 # LATIN CAPITAL LETTER N WITH CEDILLA 0xD3 0x00D3 # LATIN CAPITAL LETTER O WITH ACUTE -0xD4 0x00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX +0xD4 0x014C # LATIN CAPITAL LETTER O WITH MACRON 0xD5 0x00D5 # LATIN CAPITAL LETTER O WITH TILDE 0xD6 0x00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS 0xD7 0x00D7 # MULTIPLICATION SIGN -0xD8 0x00D8 # LATIN CAPITAL LETTER O WITH STROKE -0xD9 0x00D9 # LATIN CAPITAL LETTER U WITH GRAVE -0xDA 0x00DA # LATIN CAPITAL LETTER U WITH ACUTE -0xDB 0x00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX +0xD8 0x0172 # LATIN CAPITAL LETTER U WITH OGONEK +0xD9 0x0141 # LATIN CAPITAL LETTER L WITH STROKE +0xDA 0x015A # LATIN CAPITAL LETTER S WITH ACUTE +0xDB 0x016A # LATIN CAPITAL LETTER U WITH MACRON 0xDC 0x00DC # LATIN CAPITAL LETTER U WITH DIAERESIS -0xDD 0x00DD # LATIN CAPITAL LETTER Y WITH ACUTE -0xDE 0x00DE # LATIN CAPITAL LETTER THORN (Icelandic) -0xDF 0x00DF # LATIN SMALL LETTER SHARP S (German) -0xE0 0x00E0 # LATIN SMALL LETTER A WITH GRAVE -0xE1 0x00E1 # LATIN SMALL LETTER A WITH ACUTE -0xE2 0x00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX -0xE3 0x00E3 # LATIN SMALL LETTER A WITH TILDE +0xDD 0x017B # LATIN CAPITAL LETTER Z WITH DOT ABOVE +0xDE 0x017D # LATIN CAPITAL LETTER Z WITH CARON +0xDF 0x00DF # LATIN SMALL LETTER SHARP S +0xE0 0x0105 # LATIN SMALL LETTER A WITH OGONEK +0xE1 0x012F # LATIN SMALL LETTER I WITH OGONEK +0xE2 0x0101 # LATIN SMALL LETTER A WITH MACRON +0xE3 0x0107 # LATIN SMALL LETTER C WITH ACUTE 0xE4 0x00E4 # LATIN SMALL LETTER A WITH DIAERESIS 0xE5 0x00E5 # LATIN SMALL LETTER A WITH RING ABOVE -0xE6 0x00E6 # LATIN SMALL LETTER AE -0xE7 0x00E7 # LATIN SMALL LETTER C WITH CEDILLA -0xE8 0x00E8 # LATIN SMALL LETTER E WITH GRAVE +0xE6 0x0119 # LATIN SMALL LETTER E WITH OGONEK +0xE7 0x0113 # LATIN SMALL LETTER E WITH MACRON +0xE8 0x010D # LATIN SMALL LETTER C WITH CARON 0xE9 0x00E9 # LATIN SMALL LETTER E WITH ACUTE -0xEA 0x00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX -0xEB 0x00EB # LATIN SMALL LETTER E WITH DIAERESIS -0xEC 0x00EC # LATIN SMALL LETTER I WITH GRAVE -0xED 0x00ED # LATIN SMALL LETTER I WITH ACUTE -0xEE 0x00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX -0xEF 0x00EF # LATIN SMALL LETTER I WITH DIAERESIS -0xF0 0x00F0 # LATIN SMALL LETTER ETH (Icelandic) -0xF1 0x00F1 # LATIN SMALL LETTER N WITH TILDE -0xF2 0x00F2 # LATIN SMALL LETTER O WITH GRAVE +0xEA 0x017A # LATIN SMALL LETTER Z WITH ACUTE +0xEB 0x0117 # LATIN SMALL LETTER E WITH DOT ABOVE +0xEC 0x0123 # LATIN SMALL LETTER G WITH CEDILLA +0xED 0x0137 # LATIN SMALL LETTER K WITH CEDILLA +0xEE 0x012B # LATIN SMALL LETTER I WITH MACRON +0xEF 0x013C # LATIN SMALL LETTER L WITH CEDILLA +0xF0 0x0161 # LATIN SMALL LETTER S WITH CARON +0xF1 0x0144 # LATIN SMALL LETTER N WITH ACUTE +0xF2 0x0146 # LATIN SMALL LETTER N WITH CEDILLA 0xF3 0x00F3 # LATIN SMALL LETTER O WITH ACUTE -0xF4 0x00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX +0xF4 0x014D # LATIN SMALL LETTER O WITH MACRON 0xF5 0x00F5 # LATIN SMALL LETTER O WITH TILDE 0xF6 0x00F6 # LATIN SMALL LETTER O WITH DIAERESIS 0xF7 0x00F7 # DIVISION SIGN -0xF8 0x00F8 # LATIN SMALL LETTER O WITH STROKE -0xF9 0x00F9 # LATIN SMALL LETTER U WITH GRAVE -0xFA 0x00FA # LATIN SMALL LETTER U WITH ACUTE -0xFB 0x00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX +0xF8 0x0173 # LATIN SMALL LETTER U WITH OGONEK +0xF9 0x0142 # LATIN SMALL LETTER L WITH STROKE +0xFA 0x015B # LATIN SMALL LETTER S WITH ACUTE +0xFB 0x016B # LATIN SMALL LETTER U WITH MACRON 0xFC 0x00FC # LATIN SMALL LETTER U WITH DIAERESIS -0xFD 0x00FD # LATIN SMALL LETTER Y WITH ACUTE -0xFE 0x00FE # LATIN SMALL LETTER THORN (Icelandic) -0xFF 0x00FF # LATIN SMALL LETTER Y WITH DIAERESIS +0xFD 0x017C # LATIN SMALL LETTER Z WITH DOT ABOVE +0xFE 0x017E # LATIN SMALL LETTER Z WITH CARON +0xFF 0x2019 # RIGHT SINGLE QUOTATION MARK diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c index 9bbc027cf7..7808d269f9 100644 --- a/source3/smbd/quotas.c +++ b/source3/smbd/quotas.c @@ -244,6 +244,7 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U #if defined(SUNOS5) #include <sys/fs/ufs_quota.h> #include <sys/mnttab.h> +#include <sys/mntent.h> #else /* defined(SUNOS4) */ #include <ufs/quota.h> #include <mntent.h> @@ -264,6 +265,7 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U int file; static struct mnttab mnt; static pstring name; + pstring devopt; #else /* SunOS4 */ struct mntent *mnt; static pstring name; @@ -272,7 +274,7 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U SMB_STRUCT_STAT sbuf; SMB_DEV_T devno ; static SMB_DEV_T devno_cached = 0 ; - int found ; + static int found ; euser_id = geteuid(); @@ -280,7 +282,7 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U return(False) ; devno = sbuf.st_dev ; - DEBUG(5,("disk_quotas: looking for path \"%s\" devno=%o\n", path,devno)); + DEBUG(5,("disk_quotas: looking for path \"%s\" devno=%x\n", path,devno)); if ( devno != devno_cached ) { devno_cached = devno ; #if defined(SUNOS5) @@ -288,12 +290,17 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U return(False) ; found = False ; + slprintf(devopt, sizeof(devopt) - 1, "dev=%x", devno); while (getmntent(fd, &mnt) == 0) { - if ( sys_stat(mnt.mnt_mountp,&sbuf) == -1 ) - continue ; - DEBUG(5,("disk_quotas: testing \"%s\" devno=%o\n", - mnt.mnt_mountp,sbuf.st_dev)); - if (sbuf.st_dev == devno) { + if( !hasmntopt(&mnt, devopt) ) + continue; + + DEBUG(5,("disk_quotas: testing \"%s\" %s\n", mnt.mnt_mountp,devopt)); + + /* quotas are only on vxfs, UFS or NFS, but nfs is not supported here */ + if ( strcmp( mnt.mnt_fstype, MNTTYPE_UFS ) == 0 || + strcmp( mnt.mnt_fstype, "vxfs" ) == 0 ) + { found = True ; break ; } @@ -322,10 +329,11 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U endmntent(fd) ; #endif - if ( ! found ) - return(False) ; } + if ( ! found ) + return(False) ; + save_re_uid(); set_effective_uid(0); |